doc: define general options once

Well, twice: in lib.m4 and in CliOptions.hs. But no longer in every man page.
This commit is contained in:
Simon Michael 2016-05-28 23:43:52 -07:00
parent df07ad0109
commit 656734ccd3
17 changed files with 371 additions and 224 deletions

View File

@ -52,3 +52,37 @@ m4_define({{_csv_}}, {{```csv$1```}} )m4_dnl
m4_define({{_rules_}}, {{```rules$1```}} )m4_dnl
m4_define({{_timeclock_}}, {{```timeclock$1```}} )m4_dnl
m4_define({{_timedot_}}, {{```timedot$1```}} )m4_dnl
m4_dnl
m4_define({{_generaloptions_}}, {{
`-h`
: show general usage (or if after COMMAND, the command's usage)
`--help`
: show the current program's manual as plain text (or after an add-on COMMAND, the add-on's manual)
`--man`
: show the current program's manual with man
`--info`
: show the current program's manual with info
`--version`
: show version
`--debug=N`
: show debug output if N is 1-9 (default: 0)
`-f FILE --file=FILE`
: use a different input file. For stdin, use -
`--rules-file=RULESFILE`
: Conversion rules file to use when reading CSV (default: FILE.rules)
`--alias=OLD=NEW`
: display accounts named OLD as NEW
`--ignore-assertions`
: ignore any failing balance assertions in the journal
}} )m4_dnl

View File

@ -69,22 +69,23 @@ print API docs in Swagger 2.0 format, and exit
.RE
.TP
.B \f[C]\-h\f[]
show usage
show general usage (or if after COMMAND, the command\[aq]s usage)
.RS
.RE
.TP
.B \f[C]\-\-help\f[]
show manual
show the current program\[aq]s manual as plain text (or after an add\-on
COMMAND, the add\-on\[aq]s manual)
.RS
.RE
.TP
.B \f[C]\-\-man\f[]
show manual with man
show the current program\[aq]s manual with man
.RS
.RE
.TP
.B \f[C]\-\-info\f[]
show manual with info
show the current program\[aq]s manual with info
.RS
.RE
.TP
@ -92,6 +93,32 @@ show manual with info
show version
.RS
.RE
.TP
.B \f[C]\-\-debug=N\f[]
show debug output if N is 1\-9 (default: 0)
.RS
.RE
.TP
.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
use a different input file.
For stdin, use \-
.RS
.RE
.TP
.B \f[C]\-\-rules\-file=RULESFILE\f[]
Conversion rules file to use when reading CSV (default: FILE.rules)
.RS
.RE
.TP
.B \f[C]\-\-alias=OLD=NEW\f[]
display accounts named OLD as NEW
.RS
.RE
.TP
.B \f[C]\-\-ignore\-assertions\f[]
ignore any failing balance assertions in the journal
.RS
.RE
.SH ENVIRONMENT
.PP
\f[B]LEDGER_FILE\f[] sets the default journal file path.

View File

@ -50,20 +50,36 @@ before options as shown above.
print API docs in Swagger 2.0 format, and exit
`-h'
show usage
show general usage (or if after COMMAND, the command's usage)
`--help'
show manual
show the current program's manual as plain text (or after an add-on
COMMAND, the add-on's manual)
`--man'
show manual with man
show the current program's manual with man
`--info'
show manual with info
show the current program's manual with info
`--version'
show version
`--debug=N'
show debug output if N is 1-9 (default: 0)
`-f FILE --file=FILE'
use a different input file. For stdin, use -
`--rules-file=RULESFILE'
Conversion rules file to use when reading CSV (default: FILE.rules)
`--alias=OLD=NEW'
display accounts named OLD as NEW
`--ignore-assertions'
ignore any failing balance assertions in the journal

Tag Table:

View File

@ -62,20 +62,7 @@ Note: if invoking hledger-api as a hledger subcommand, write `--` before options
`--swagger`
: print API docs in Swagger 2.0 format, and exit
`-h`
: show usage
`--help`
: show manual
`--man`
: show manual with man
`--info`
: show manual with info
`--version`
: show version
_generaloptions_
_man_({{

View File

@ -50,17 +50,34 @@ OOPPTTIIOONNSS
----sswwaaggggeerr
print API docs in Swagger 2.0 format, and exit
--hh show usage
--hh show general usage (or if after COMMAND, the command's usage)
----hheellpp show manual
----hheellpp show the current program's manual as plain text (or after an
add-on COMMAND, the add-on's manual)
----mmaann show manual with man
----mmaann show the current program's manual with man
----iinnffoo show manual with info
----iinnffoo show the current program's manual with info
----vveerrssiioonn
show version
----ddeebbuugg==NN
show debug output if N is 1-9 (default: 0)
--ff FFIILLEE ----ffiillee==FFIILLEE
use a different input file. For stdin, use -
----rruulleess--ffiillee==RRUULLEESSFFIILLEE
Conversion rules file to use when reading CSV (default:
FILE.rules)
----aalliiaass==OOLLDD==NNEEWW
display accounts named OLD as NEW
----iiggnnoorree--aasssseerrttiioonnss
ignore any failing balance assertions in the journal
EENNVVIIRROONNMMEENNTT
LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is
~/.hledger.journal.

View File

@ -70,22 +70,23 @@ commodity (accounts screen only)
.RE
.TP
.B \f[C]\-h\f[]
show usage
show general usage (or if after COMMAND, the command\[aq]s usage)
.RS
.RE
.TP
.B \f[C]\-\-help\f[]
show manual
show the current program\[aq]s manual as plain text (or after an add\-on
COMMAND, the add\-on\[aq]s manual)
.RS
.RE
.TP
.B \f[C]\-\-man\f[]
show manual with man
show the current program\[aq]s manual with man
.RS
.RE
.TP
.B \f[C]\-\-info\f[]
show manual with info
show the current program\[aq]s manual with info
.RS
.RE
.TP
@ -93,6 +94,32 @@ show manual with info
show version
.RS
.RE
.TP
.B \f[C]\-\-debug=N\f[]
show debug output if N is 1\-9 (default: 0)
.RS
.RE
.TP
.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
use a different input file.
For stdin, use \-
.RS
.RE
.TP
.B \f[C]\-\-rules\-file=RULESFILE\f[]
Conversion rules file to use when reading CSV (default: FILE.rules)
.RS
.RE
.TP
.B \f[C]\-\-alias=OLD=NEW\f[]
display accounts named OLD as NEW
.RS
.RE
.TP
.B \f[C]\-\-ignore\-assertions\f[]
ignore any failing balance assertions in the journal
.RS
.RE
.SS hledger options
.PP
The following common hledger options should also work:

View File

@ -55,20 +55,36 @@ the data.
valuation commodity (accounts screen only)
`-h'
show usage
show general usage (or if after COMMAND, the command's usage)
`--help'
show manual
show the current program's manual as plain text (or after an add-on
COMMAND, the add-on's manual)
`--man'
show manual with man
show the current program's manual with man
`--info'
show manual with info
show the current program's manual with info
`--version'
show version
`--debug=N'
show debug output if N is 1-9 (default: 0)
`-f FILE --file=FILE'
use a different input file. For stdin, use -
`--rules-file=RULESFILE'
Conversion rules file to use when reading CSV (default: FILE.rules)
`--alias=OLD=NEW'
display accounts named OLD as NEW
`--ignore-assertions'
ignore any failing balance assertions in the journal
* Menu:
* hledger options::
@ -271,19 +287,19 @@ Tag Table:
Node: Top88
Node: OPTIONS714
Ref: #options813
Node: hledger options1579
Ref: #hledger-options1685
Node: KEYS2868
Ref: #keys2965
Node: SCREENS3362
Ref: #screens3449
Node: Accounts screen3539
Ref: #accounts-screen3669
Node: Register screen4514
Ref: #register-screen4671
Node: Transaction screen6053
Ref: #transaction-screen6213
Node: Error screen7080
Ref: #error-screen7204
Node: hledger options2137
Ref: #hledger-options2243
Node: KEYS3426
Ref: #keys3523
Node: SCREENS3920
Ref: #screens4007
Node: Accounts screen4097
Ref: #accounts-screen4227
Node: Register screen5072
Ref: #register-screen5229
Node: Transaction screen6611
Ref: #transaction-screen6771
Node: Error screen7638
Ref: #error-screen7762

End Tag Table

View File

@ -74,20 +74,7 @@ Any QUERYARGS are interpreted as a hledger search query which filters the data.
: show amounts as their current market value in their default valuation commodity
(accounts screen only)
`-h`
: show usage
`--help`
: show manual
`--man`
: show manual with man
`--info`
: show manual with info
`--version`
: show version
_generaloptions_
## hledger options

View File

@ -54,17 +54,34 @@ OOPPTTIIOONNSS
show amounts as their current market value in their default val-
uation commodity (accounts screen only)
--hh show usage
--hh show general usage (or if after COMMAND, the command's usage)
----hheellpp show manual
----hheellpp show the current program's manual as plain text (or after an
add-on COMMAND, the add-on's manual)
----mmaann show manual with man
----mmaann show the current program's manual with man
----iinnffoo show manual with info
----iinnffoo show the current program's manual with info
----vveerrssiioonn
show version
----ddeebbuugg==NN
show debug output if N is 1-9 (default: 0)
--ff FFIILLEE ----ffiillee==FFIILLEE
use a different input file. For stdin, use -
----rruulleess--ffiillee==RRUULLEESSFFIILLEE
Conversion rules file to use when reading CSV (default:
FILE.rules)
----aalliiaass==OOLLDD==NNEEWW
display accounts named OLD as NEW
----iiggnnoorree--aasssseerrttiioonnss
ignore any failing balance assertions in the journal
hhlleeddggeerr ooppttiioonnss
The following common hledger options should also work:

View File

@ -115,22 +115,23 @@ with this.
.RE
.TP
.B \f[C]\-h\f[]
show usage
show general usage (or if after COMMAND, the command\[aq]s usage)
.RS
.RE
.TP
.B \f[C]\-\-help\f[]
show manual
show the current program\[aq]s manual as plain text (or after an add\-on
COMMAND, the add\-on\[aq]s manual)
.RS
.RE
.TP
.B \f[C]\-\-man\f[]
show manual with man
show the current program\[aq]s manual with man
.RS
.RE
.TP
.B \f[C]\-\-info\f[]
show manual with info
show the current program\[aq]s manual with info
.RS
.RE
.TP
@ -138,6 +139,32 @@ show manual with info
show version
.RS
.RE
.TP
.B \f[C]\-\-debug=N\f[]
show debug output if N is 1\-9 (default: 0)
.RS
.RE
.TP
.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
use a different input file.
For stdin, use \-
.RS
.RE
.TP
.B \f[C]\-\-rules\-file=RULESFILE\f[]
Conversion rules file to use when reading CSV (default: FILE.rules)
.RS
.RE
.TP
.B \f[C]\-\-alias=OLD=NEW\f[]
display accounts named OLD as NEW
.RS
.RE
.TP
.B \f[C]\-\-ignore\-assertions\f[]
ignore any failing balance assertions in the journal
.RS
.RE
.SS hledger options
.PP
The following common hledger options should also work:

View File

@ -92,20 +92,36 @@ before options as shown above.
with this.
`-h'
show usage
show general usage (or if after COMMAND, the command's usage)
`--help'
show manual
show the current program's manual as plain text (or after an add-on
COMMAND, the add-on's manual)
`--man'
show manual with man
show the current program's manual with man
`--info'
show manual with info
show the current program's manual with info
`--version'
show version
`--debug=N'
show debug output if N is 1-9 (default: 0)
`-f FILE --file=FILE'
use a different input file. For stdin, use -
`--rules-file=RULESFILE'
Conversion rules file to use when reading CSV (default: FILE.rules)
`--alias=OLD=NEW'
display accounts named OLD as NEW
`--ignore-assertions'
ignore any failing balance assertions in the journal
* Menu:
* hledger options::
@ -173,7 +189,7 @@ Tag Table:
Node: Top90
Node: OPTIONS2868
Ref: #options2955
Node: hledger options3818
Ref: #hledger-options3925
Node: hledger options4376
Ref: #hledger-options4483

End Tag Table

View File

@ -121,20 +121,7 @@ You would change this when sharing over the network, or integrating within a lar
hledger-web normally serves static files itself, but if you wanted to
serve them from another server for efficiency, you would set the url with this.
`-h`
: show usage
`--help`
: show manual
`--man`
: show manual with man
`--info`
: show manual with info
`--version`
: show version
_generaloptions_
## hledger options

View File

@ -92,17 +92,34 @@ OOPPTTIIOONNSS
them from another server for efficiency, you would set the url
with this.
--hh show usage
--hh show general usage (or if after COMMAND, the command's usage)
----hheellpp show manual
----hheellpp show the current program's manual as plain text (or after an
add-on COMMAND, the add-on's manual)
----mmaann show manual with man
----mmaann show the current program's manual with man
----iinnffoo show manual with info
----iinnffoo show the current program's manual with info
----vveerrssiioonn
show version
----ddeebbuugg==NN
show debug output if N is 1-9 (default: 0)
--ff FFIILLEE ----ffiillee==FFIILLEE
use a different input file. For stdin, use -
----rruulleess--ffiillee==RRUULLEESSFFIILLEE
Conversion rules file to use when reading CSV (default:
FILE.rules)
----aalliiaass==OOLLDD==NNEEWW
display accounts named OLD as NEW
----iiggnnoorree--aasssseerrttiioonnss
ignore any failing balance assertions in the journal
hhlleeddggeerr ooppttiioonnss
The following common hledger options should also work:

View File

@ -218,6 +218,11 @@ show version
.RS
.RE
.TP
.B \f[C]\-\-debug=N\f[]
show debug output if N is 1\-9 (default: 0)
.RS
.RE
.TP
.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
use a different input file.
For stdin, use \-
@ -238,11 +243,6 @@ display accounts named OLD as NEW
ignore any failing balance assertions in the journal
.RS
.RE
.TP
.B \f[C]\-\-debug=N\f[]
: show debug output if N is 1\-9 (default: 0)
.RS
.RE
.PP
Common reporting options are supported by most commands where
applicable, and individual commands may provide additional

View File

@ -174,6 +174,9 @@ available and can appear anywhere in the command line:
`--version'
show version
`--debug=N'
show debug output if N is 1-9 (default: 0)
`-f FILE --file=FILE'
use a different input file. For stdin, use -
@ -186,9 +189,6 @@ available and can appear anywhere in the command line:
`--ignore-assertions'
ignore any failing balance assertions in the journal
`--debug=N'
: show debug output if N is 1-9 (default: 0)
Common reporting options are supported by most commands where
applicable, and individual commands may provide additional
command-specific options. Both of these must be written after the
@ -2043,95 +2043,95 @@ Node: EXAMPLES1748
Ref: #examples1850
Node: OPTIONS3854
Ref: #options3958
Node: Multiple files7275
Ref: #multiple-files7400
Node: Repeated options7665
Ref: #repeated-options7817
Node: Depth limiting7937
Ref: #depth-limiting8082
Node: Smart dates8283
Ref: #smart-dates8424
Node: Reporting interval9421
Ref: #reporting-interval9580
Node: Period expressions9923
Ref: #period-expressions10090
Node: Regular Expressions12136
Ref: #regular-expressions12278
Node: QUERIES13761
Ref: #queries13865
Node: COMMANDS17167
Ref: #commands17281
Node: accounts17954
Ref: #accounts18054
Node: activity19036
Ref: #activity19148
Node: add19507
Ref: #add19608
Node: balance22267
Ref: #balance22380
Node: Flat mode25096
Ref: #flat-mode25223
Node: Depth limited balance reports25642
Ref: #depth-limited-balance-reports25845
Node: Multicolumn balance reports26266
Ref: #multicolumn-balance-reports26468
Node: Market value31117
Ref: #market-value31281
Node: Custom balance output31774
Ref: #custom-balance-output31947
Node: Output destination34051
Ref: #output-destination34216
Node: CSV output34486
Ref: #csv-output34605
Node: balancesheet35002
Ref: #balancesheet35130
Node: cashflow35782
Ref: #cashflow35899
Node: help36589
Ref: #help36701
Node: incomestatement37538
Ref: #incomestatement37668
Node: info38395
Ref: #info38502
Node: man38864
Ref: #man38961
Node: print39364
Ref: #print39469
Node: register40820
Ref: #register40933
Node: Custom register output45274
Ref: #custom-register-output45405
Node: stats46702
Ref: #stats46808
Node: test47689
Ref: #test47776
Node: ADD-ON COMMANDS48143
Ref: #add-on-commands48279
Node: api49567
Ref: #api49659
Node: autosync49693
Ref: #autosync49808
Node: diff52123
Ref: #diff52233
Node: equity52897
Ref: #equity53011
Node: interest54339
Ref: #interest54456
Node: irr57540
Ref: #irr57653
Node: print-unique60028
Ref: #print-unique60158
Node: rewrite60416
Ref: #rewrite60535
Node: ui61064
Ref: #ui61164
Node: web61205
Ref: #web61293
Node: TROUBLESHOOTING61326
Ref: #troubleshooting61445
Node: Run-time problems61499
Ref: #run-time-problems61642
Node: Known limitations63586
Ref: #known-limitations63729
Node: Multiple files7273
Ref: #multiple-files7398
Node: Repeated options7663
Ref: #repeated-options7815
Node: Depth limiting7935
Ref: #depth-limiting8080
Node: Smart dates8281
Ref: #smart-dates8422
Node: Reporting interval9419
Ref: #reporting-interval9578
Node: Period expressions9921
Ref: #period-expressions10088
Node: Regular Expressions12134
Ref: #regular-expressions12276
Node: QUERIES13759
Ref: #queries13863
Node: COMMANDS17165
Ref: #commands17279
Node: accounts17952
Ref: #accounts18052
Node: activity19034
Ref: #activity19146
Node: add19505
Ref: #add19606
Node: balance22265
Ref: #balance22378
Node: Flat mode25094
Ref: #flat-mode25221
Node: Depth limited balance reports25640
Ref: #depth-limited-balance-reports25843
Node: Multicolumn balance reports26264
Ref: #multicolumn-balance-reports26466
Node: Market value31115
Ref: #market-value31279
Node: Custom balance output31772
Ref: #custom-balance-output31945
Node: Output destination34049
Ref: #output-destination34214
Node: CSV output34484
Ref: #csv-output34603
Node: balancesheet35000
Ref: #balancesheet35128
Node: cashflow35780
Ref: #cashflow35897
Node: help36587
Ref: #help36699
Node: incomestatement37536
Ref: #incomestatement37666
Node: info38393
Ref: #info38500
Node: man38862
Ref: #man38959
Node: print39362
Ref: #print39467
Node: register40818
Ref: #register40931
Node: Custom register output45272
Ref: #custom-register-output45403
Node: stats46700
Ref: #stats46806
Node: test47687
Ref: #test47774
Node: ADD-ON COMMANDS48141
Ref: #add-on-commands48277
Node: api49565
Ref: #api49657
Node: autosync49691
Ref: #autosync49806
Node: diff52121
Ref: #diff52231
Node: equity52895
Ref: #equity53009
Node: interest54337
Ref: #interest54454
Node: irr57538
Ref: #irr57651
Node: print-unique60026
Ref: #print-unique60156
Node: rewrite60414
Ref: #rewrite60533
Node: ui61062
Ref: #ui61162
Node: web61203
Ref: #web61291
Node: TROUBLESHOOTING61324
Ref: #troubleshooting61443
Node: Run-time problems61497
Ref: #run-time-problems61640
Node: Known limitations63584
Ref: #known-limitations63727

End Tag Table

View File

@ -149,6 +149,9 @@ OOPPTTIIOONNSS
----vveerrssiioonn
show version
----ddeebbuugg==NN
show debug output if N is 1-9 (default: 0)
--ff FFIILLEE ----ffiillee==FFIILLEE
use a different input file. For stdin, use -
@ -162,9 +165,6 @@ OOPPTTIIOONNSS
----iiggnnoorree--aasssseerrttiioonnss
ignore any failing balance assertions in the journal
----ddeebbuugg==NN
: show debug output if N is 1-9 (default: 0)
Common reporting options are supported by most commands where applica-
ble, and individual commands may provide additional command-specific
options. Both of these must be written after the command name.

View File

@ -22,35 +22,7 @@ interpreted as a search query which filters the data, see QUERIES.
There are three kinds of options.
General options are always available and can appear anywhere in the command line:
`-h`
: show general usage (or if after COMMAND, the command's usage)
`--help`
: show the current program's manual as plain text (or after an add-on COMMAND, the add-on's manual)
`--man`
: show the current program's manual with man
`--info`
: show the current program's manual with info
`--version`
: show version
`-f FILE --file=FILE`
: use a different input file. For stdin, use -
`--rules-file=RULESFILE`
: Conversion rules file to use when reading CSV (default: FILE.rules)
`--alias=OLD=NEW`
: display accounts named OLD as NEW
`--ignore-assertions`
: ignore any failing balance assertions in the journal
`--debug=N`
: : show debug output if N is 1-9 (default: 0)
_generaloptions_
Common reporting options are supported by most commands where applicable,
and individual commands may provide additional command-specific options.