From 863989e0e734756369659907e08af7eb08971116 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 27 Mar 2017 05:16:28 -0700 Subject: [PATCH] print: bring back the short -x form of --explicit (#442) --- hledger/Hledger/Cli/Print.hs | 2 +- hledger/doc/commands.m4.md | 4 +- hledger/doc/hledger.1 | 8 +- hledger/doc/hledger.1.info | 130 ++++++++++++++++----------------- hledger/doc/hledger.1.txt | 14 ++-- tests/journal/commodities.test | 4 +- 6 files changed, 81 insertions(+), 81 deletions(-) diff --git a/hledger/Hledger/Cli/Print.hs b/hledger/Hledger/Cli/Print.hs index 0c1f91250..0cb276a5f 100644 --- a/hledger/Hledger/Cli/Print.hs +++ b/hledger/Hledger/Cli/Print.hs @@ -36,7 +36,7 @@ printmode = (defCommandMode $ ["print"] ++ aliases) { flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) matcharg ("show the transaction whose description is most similar to "++matcharg ++ ", and is most recent"), - flagNone ["explicit"] (setboolopt "explicit") + flagNone ["explicit","x"] (setboolopt "explicit") "show all amounts explicitly" ] ++ outputflags diff --git a/hledger/doc/commands.m4.md b/hledger/doc/commands.m4.md index 5a98dd9d6..774d0c6dc 100644 --- a/hledger/doc/commands.m4.md +++ b/hledger/doc/commands.m4.md @@ -353,7 +353,7 @@ As with [help](#help), run it with no arguments to list available topics (manual ## print Show transactions from the journal. -` --explicit` +`-x --explicit` : show all amounts explicitly `-m STR --match=STR ` @@ -397,7 +397,7 @@ However it may not preserve all original content, eg it does not print directive Normally, transactions' implicit/explicit amount style is preserved: when an amount is omitted in the journal, it will be omitted in the output. -You can use the `--explicit` flag to make all amounts explicit, which can be +You can use the `-x/--explicit` flag to make all amounts explicit, which can be useful for troubleshooting or for making your journal more readable and robust against data entry errors. Note, in this mode postings with a multi-commodity amount diff --git a/hledger/doc/hledger.1 b/hledger/doc/hledger.1 index 26c84d8eb..6ead067ef 100644 --- a/hledger/doc/hledger.1 +++ b/hledger/doc/hledger.1 @@ -1890,7 +1890,7 @@ As with help, run it with no arguments to list available topics .PP Show transactions from the journal. .TP -.B \f[C]\-\-explicit\f[] +.B \f[C]\-x\ \ \ \ \ \-\-explicit\f[] show all amounts explicitly .RS .RE @@ -1949,9 +1949,9 @@ directives or inter\-transaction comments. Normally, transactions\[aq] implicit/explicit amount style is preserved: when an amount is omitted in the journal, it will be omitted in the output. -You can use the \f[C]\-\-explicit\f[] flag to make all amounts explicit, -which can be useful for troubleshooting or for making your journal more -readable and robust against data entry errors. +You can use the \f[C]\-x/\-\-explicit\f[] flag to make all amounts +explicit, which can be useful for troubleshooting or for making your +journal more readable and robust against data entry errors. Note, in this mode postings with a multi\-commodity amount (possible with an implicit amount in a multi\-commodity transaction) will be split into multiple single\-commodity postings, for valid journal output. diff --git a/hledger/doc/hledger.1.info b/hledger/doc/hledger.1.info index 44395383e..8b64c75b0 100644 --- a/hledger/doc/hledger.1.info +++ b/hledger/doc/hledger.1.info @@ -1477,7 +1477,7 @@ File: hledger.1.info, Node: print, Next: register, Prev: man, Up: COMMANDS Show transactions from the journal. -'--explicit' +'-x --explicit' show all amounts explicitly '-m STR --match=STR' @@ -1523,12 +1523,12 @@ directives or inter-transaction comments. Normally, transactions' implicit/explicit amount style is preserved: when an amount is omitted in the journal, it will be omitted in the -output. You can use the '--explicit' flag to make all amounts explicit, -which can be useful for troubleshooting or for making your journal more -readable and robust against data entry errors. Note, in this mode -postings with a multi-commodity amount (possible with an implicit amount -in a multi-commodity transaction) will be split into multiple -single-commodity postings, for valid journal output. +output. You can use the '-x/--explicit' flag to make all amounts +explicit, which can be useful for troubleshooting or for making your +journal more readable and robust against data entry errors. Note, in +this mode postings with a multi-commodity amount (possible with an +implicit amount in a multi-commodity transaction) will be split into +multiple single-commodity postings, for valid journal output. With -B/-cost, amounts with transaction prices are converted to cost (using the transaction price). @@ -2162,63 +2162,63 @@ Node: man47520 Ref: #man47617 Node: print48022 Ref: #print48127 -Node: register51877 -Ref: #register51990 -Node: Custom register output56486 -Ref: #custom-register-output56617 -Node: stats57914 -Ref: #stats58020 -Node: test58901 -Ref: #test58988 -Node: ADD-ON COMMANDS59356 -Ref: #add-on-commands59492 -Node: Official add-ons60779 -Ref: #official-add-ons60921 -Node: api61008 -Ref: #api61099 -Node: ui61151 -Ref: #ui61252 -Node: web61310 -Ref: #web61401 -Node: Third party add-ons61447 -Ref: #third-party-add-ons61624 -Node: diff61759 -Ref: #diff61858 -Node: iadd61957 -Ref: #iadd62073 -Node: interest62156 -Ref: #interest62279 -Node: irr62374 -Ref: #irr62474 -Node: Experimental add-ons62552 -Ref: #experimental-add-ons62706 -Node: autosync63093 -Ref: #autosync63207 -Node: budget63446 -Ref: #budget63570 -Node: chart63636 -Ref: #chart63755 -Node: check63826 -Ref: #check63950 -Node: check-dates64017 -Ref: #check-dates64153 -Node: dupes64226 -Ref: #dupes64351 -Node: equity64422 -Ref: #equity64544 -Node: prices64663 -Ref: #prices64792 -Node: print-unique64847 -Ref: #print-unique64996 -Node: register-match65089 -Ref: #register-match65245 -Node: rewrite65343 -Ref: #rewrite65464 -Node: TROUBLESHOOTING65542 -Ref: #troubleshooting65661 -Node: Run-time problems65715 -Ref: #run-time-problems65858 -Node: Known limitations67805 -Ref: #known-limitations67948 +Node: register51883 +Ref: #register51996 +Node: Custom register output56492 +Ref: #custom-register-output56623 +Node: stats57920 +Ref: #stats58026 +Node: test58907 +Ref: #test58994 +Node: ADD-ON COMMANDS59362 +Ref: #add-on-commands59498 +Node: Official add-ons60785 +Ref: #official-add-ons60927 +Node: api61014 +Ref: #api61105 +Node: ui61157 +Ref: #ui61258 +Node: web61316 +Ref: #web61407 +Node: Third party add-ons61453 +Ref: #third-party-add-ons61630 +Node: diff61765 +Ref: #diff61864 +Node: iadd61963 +Ref: #iadd62079 +Node: interest62162 +Ref: #interest62285 +Node: irr62380 +Ref: #irr62480 +Node: Experimental add-ons62558 +Ref: #experimental-add-ons62712 +Node: autosync63099 +Ref: #autosync63213 +Node: budget63452 +Ref: #budget63576 +Node: chart63642 +Ref: #chart63761 +Node: check63832 +Ref: #check63956 +Node: check-dates64023 +Ref: #check-dates64159 +Node: dupes64232 +Ref: #dupes64357 +Node: equity64428 +Ref: #equity64550 +Node: prices64669 +Ref: #prices64798 +Node: print-unique64853 +Ref: #print-unique65002 +Node: register-match65095 +Ref: #register-match65251 +Node: rewrite65349 +Ref: #rewrite65470 +Node: TROUBLESHOOTING65548 +Ref: #troubleshooting65667 +Node: Run-time problems65721 +Ref: #run-time-problems65864 +Node: Known limitations67811 +Ref: #known-limitations67954  End Tag Table diff --git a/hledger/doc/hledger.1.txt b/hledger/doc/hledger.1.txt index b0a5c457d..b215b7e97 100644 --- a/hledger/doc/hledger.1.txt +++ b/hledger/doc/hledger.1.txt @@ -1320,7 +1320,7 @@ COMMANDS print Show transactions from the journal. - --explicit + -x --explicit show all amounts explicitly -m STR --match=STR @@ -1365,12 +1365,12 @@ COMMANDS Normally, transactions' implicit/explicit amount style is preserved: when an amount is omitted in the journal, it will be omitted in the - output. You can use the --explicit flag to make all amounts explicit, - which can be useful for troubleshooting or for making your journal more - readable and robust against data entry errors. Note, in this mode - postings with a multi-commodity amount (possible with an implicit - amount in a multi-commodity transaction) will be split into multiple - single-commodity postings, for valid journal output. + output. You can use the -x/--explicit flag to make all amounts + explicit, which can be useful for troubleshooting or for making your + journal more readable and robust against data entry errors. Note, in + this mode postings with a multi-commodity amount (possible with an + implicit amount in a multi-commodity transaction) will be split into + multiple single-commodity postings, for valid journal output. With -B/--cost, amounts with transaction prices are converted to cost (using the transaction price). diff --git a/tests/journal/commodities.test b/tests/journal/commodities.test index 604324d74..a4eb95577 100644 --- a/tests/journal/commodities.test +++ b/tests/journal/commodities.test @@ -33,8 +33,8 @@ hledger -f- balance 0 >>>=0 -# 4. autobalance with prices -hledger -f- print --explicit +# 4. autobalance with prices, using short form of --explicit this time +hledger -f- print -x <<< 2016/1/1 saving-card $-105