fix:print: remove unused --show-costs flag from command line help

This commit is contained in:
Simon Michael 2025-09-09 12:11:31 +01:00
parent 6d164b48a0
commit 3a1e30255c
4 changed files with 4 additions and 7 deletions

View File

@ -50,8 +50,6 @@ printmode = hledgerCommandMode
$(embedFileRelative "Hledger/Cli/Commands/Print.txt")
([flagNone ["explicit","x"] (setboolopt "explicit")
"show all amounts explicitly"
,flagNone ["show-costs"] (setboolopt "show-costs")
"show transaction prices even with conversion postings"
,roundFlag
,flagNone ["invert"] (setboolopt "invert") "display all amounts with reversed sign"
,flagNone ["new"] (setboolopt "new")
@ -159,8 +157,7 @@ printEntries opts@CliOpts{rawopts_=rawopts, reportspec_=rspec} j =
-- Use the fully inferred and amount-styled/rounded transaction in the following situations:
-- with -x/--explicit:
| boolopt "explicit" (rawopts_ opts) = id
-- with --show-costs:
-- XXX infer_costs is --infer-costs not --show-costs. And where is show-costs used anyway ?
-- with --infer-costs
| opts ^. infer_costs = id
-- with -B/-V/-X/--value ("because of #551, and because of print -V valuing only one posting when there's an implicit txn price.")
| has (value . _Just) opts = id

View File

@ -220,7 +220,7 @@ setupHledger = do
-- pdesc "common general options are configured ?"
-- --infer-costs"
-- print --explicit --show-costs"
-- print --explicit --infer-costs"
return $ Just $ Right conf
else

View File

@ -578,7 +578,7 @@ in a more featureful hledger config file. Here's a small example:
# Options following a `[COMMAND]` heading are used with that hledger command only.
[print]
--explicit --show-costs
--explicit --infer-costs
```
To use a config file, specify it with the `--conf` option.

View File

@ -467,7 +467,7 @@ $ hledger -f- print --infer-costs
assets $-135
assets £-80
$ hledger -f- print --show-costs --infer-costs
$ hledger -f- print --infer-costs
2011-01-01
expenses:food €110 @@ £80
expenses:foreign currency €100 @@ $135