imp:print: rename --location to --locations for consistency
with `accounts`. --location still works, as a hidden flag.
This commit is contained in:
parent
64023478b7
commit
9af95105b4
@ -51,7 +51,7 @@ printmode = hledgerCommandMode
|
|||||||
([
|
([
|
||||||
flagNone ["explicit","x"] (setboolopt "explicit") "show all amounts explicitly"
|
flagNone ["explicit","x"] (setboolopt "explicit") "show all amounts explicitly"
|
||||||
,flagNone ["invert"] (setboolopt "invert") "display all amounts with reversed sign"
|
,flagNone ["invert"] (setboolopt "invert") "display all amounts with reversed sign"
|
||||||
,flagNone ["location"] (setboolopt "location") "add tags showing file paths and line numbers"
|
,flagNone ["locations"] (setboolopt "locations") "add tags showing file paths and line numbers"
|
||||||
,let arg = "DESC" in
|
,let arg = "DESC" in
|
||||||
flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) arg
|
flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) arg
|
||||||
("fuzzy search for one recent transaction with description closest to "++arg)
|
("fuzzy search for one recent transaction with description closest to "++arg)
|
||||||
@ -63,7 +63,10 @@ printmode = hledgerCommandMode
|
|||||||
,outputFileFlag
|
,outputFileFlag
|
||||||
])
|
])
|
||||||
cligeneralflagsgroups1
|
cligeneralflagsgroups1
|
||||||
hiddenflags
|
(hiddenflags ++
|
||||||
|
-- this works already as a unique abbreviation, but declare here in case it ever becomes nonunique
|
||||||
|
[flagNone ["location"] (setboolopt "locations") "deprecated, use --locations instead"
|
||||||
|
])
|
||||||
([], Just $ argsFlag "[QUERY]")
|
([], Just $ argsFlag "[QUERY]")
|
||||||
|
|
||||||
roundFlag = flagReq ["round"] (\s opts -> Right $ setopt "round" s opts) "TYPE" $
|
roundFlag = flagReq ["round"] (\s opts -> Right $ setopt "round" s opts) "TYPE" $
|
||||||
@ -114,7 +117,7 @@ print' opts@CliOpts{rawopts_=rawopts} j = do
|
|||||||
-- & dbg9With (lbl "amounts before setting full precision".showJournalPostingAmountsDebug)
|
-- & dbg9With (lbl "amounts before setting full precision".showJournalPostingAmountsDebug)
|
||||||
& journalMapPostingAmounts mixedAmountSetFullPrecision
|
& journalMapPostingAmounts mixedAmountSetFullPrecision
|
||||||
-- & dbg9With (lbl "amounts after setting full precision: ".showJournalPostingAmountsDebug)
|
-- & dbg9With (lbl "amounts after setting full precision: ".showJournalPostingAmountsDebug)
|
||||||
& if boolopt "location" rawopts then journalMapTransactions addLocationTag else id
|
& if boolopt "locations" rawopts then journalMapTransactions addLocationTag else id
|
||||||
|
|
||||||
case maybestringopt "match" $ rawopts_ opts of
|
case maybestringopt "match" $ rawopts_ opts of
|
||||||
Nothing -> printEntries opts j'
|
Nothing -> printEntries opts j'
|
||||||
|
|||||||
@ -6,7 +6,7 @@ Show full journal entries, representing transactions.
|
|||||||
Flags:
|
Flags:
|
||||||
-x --explicit show all amounts explicitly
|
-x --explicit show all amounts explicitly
|
||||||
--invert display all amounts with reversed sign
|
--invert display all amounts with reversed sign
|
||||||
--location add tags showing file paths and line numbers
|
--locations add tags showing file paths and line numbers
|
||||||
-m --match=DESC fuzzy search for one recent transaction with
|
-m --match=DESC fuzzy search for one recent transaction with
|
||||||
description closest to DESC
|
description closest to DESC
|
||||||
--new show only newer-dated transactions added in each
|
--new show only newer-dated transactions added in each
|
||||||
@ -145,7 +145,7 @@ DESC should contain at least two characters.
|
|||||||
If there is no similar-enough match,
|
If there is no similar-enough match,
|
||||||
no transaction will be shown and the program exit code will be non-zero.
|
no transaction will be shown and the program exit code will be non-zero.
|
||||||
|
|
||||||
With `--location`, print adds the source file and line number to every transaction, as a tag.
|
With `--locations`, print adds the source file and line number to every transaction, as a tag.
|
||||||
|
|
||||||
### print output format
|
### print output format
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user