;doc: options cleanup

This commit is contained in:
Simon Michael 2024-05-29 14:42:51 -10:00
parent 3a387fab47
commit 1295ea7678
2 changed files with 8 additions and 164 deletions

View File

@ -131,174 +131,14 @@ General output/reporting flags (supported by some commands):
--debug=[N] show debug output (levels 1-9, default: 1) --debug=[N] show debug output (levels 1-9, default: 1)
General help flags: General help flags:
-h --help show command line help
--tldr show command examples with tldr
--info show the hledger manual with info
--man show the hledger manual with man
--version show version information --version show version information
-h --help show command-line help for hledger [or COMMAND]
--info show the hledger manual [for COMMAND] with info
--man show the hledger manual [for COMMAND] with man
``` ```
}} )m4_dnl }} )m4_dnl
m4_dnl m4_dnl
m4_dnl Too much hassle for now:
m4_dnl m4_define({{_helpoptions_}}, {{
m4_dnl
m4_dnl `--version`
m4_dnl : show version information
m4_dnl
m4_dnl `-h --help`
m4_dnl : show command-line help for hledger [or COMMAND]
m4_dnl
m4_dnl `--info`
m4_dnl : show the hledger manual [for COMMAND] with info
m4_dnl
m4_dnl `--man`
m4_dnl : show the hledger manual [for COMMAND] with man
m4_dnl
m4_dnl }} )m4_dnl
m4_dnl
m4_dnl m4_define({{_inputoptions_}}, {{
m4_dnl
m4_dnl `-f FILE --file=FILE`
m4_dnl : use a different input file. For stdin, use - (default: `$LEDGER_FILE` or `$HOME/.hledger.journal`)
m4_dnl
m4_dnl `--rules-file=RULESFILE`
m4_dnl : Conversion rules file to use when reading CSV (default: FILE.rules)
m4_dnl
m4_dnl `--separator=CHAR`
m4_dnl : Field separator to expect when reading CSV (default: ',')
m4_dnl
m4_dnl `--alias=OLD=NEW`
m4_dnl : rename accounts named OLD to NEW
m4_dnl
m4_dnl `--pivot FIELDNAME`
m4_dnl : use some other field or tag for the account name
m4_dnl
m4_dnl `-I --ignore-assertions`
m4_dnl : disable balance assertion checks (note: does not disable balance assignments)
m4_dnl
m4_dnl `-s --strict`
m4_dnl : do extra error checking (check that all posted accounts are declared)
m4_dnl
m4_dnl }} )m4_dnl
m4_dnl m4_dnl
m4_dnl m4_define({{_reportingoptions_}}, {{
m4_dnl
m4_dnl `-b --begin=DATE`
m4_dnl : include postings/txns on or after this date
m4_dnl (will be adjusted to preceding subperiod start when using a report interval)
m4_dnl
m4_dnl `-e --end=DATE`
m4_dnl : include postings/txns before this date
m4_dnl (will be adjusted to following subperiod end when using a report interval)
m4_dnl
m4_dnl `-D --daily`
m4_dnl : multiperiod/multicolumn report by day
m4_dnl
m4_dnl `-W --weekly`
m4_dnl : multiperiod/multicolumn report by week
m4_dnl
m4_dnl `-M --monthly`
m4_dnl : multiperiod/multicolumn report by month
m4_dnl
m4_dnl `-Q --quarterly`
m4_dnl : multiperiod/multicolumn report by quarter
m4_dnl
m4_dnl `-Y --yearly`
m4_dnl : multiperiod/multicolumn report by year
m4_dnl
m4_dnl `-p --period=PERIODEXP`
m4_dnl : set start date, end date, and/or reporting interval all at once using [period expressions](hledger.html#period-expressions) syntax
m4_dnl
m4_dnl `--date2`
m4_dnl : match the secondary date instead (see command help for other effects)
m4_dnl
m4_dnl `--today=DATE`
m4_dnl : override today's date (affects relative smart dates, for tests/examples)
m4_dnl
m4_dnl `-U --unmarked`
m4_dnl : include only unmarked postings/txns (can combine with -P or -C)
m4_dnl
m4_dnl `-P --pending`
m4_dnl : include only pending postings/txns
m4_dnl
m4_dnl `-C --cleared`
m4_dnl : include only cleared postings/txns
m4_dnl
m4_dnl `-R --real`
m4_dnl : include only non-virtual postings
m4_dnl
m4_dnl `-NUM --depth=NUM`
m4_dnl : hide/aggregate accounts or postings more than NUM levels deep
m4_dnl
m4_dnl `-E --empty`
m4_dnl : show items with zero amount, normally hidden (and vice-versa in hledger-ui/hledger-web)
m4_dnl
m4_dnl `-B --cost`
m4_dnl : convert amounts to their cost/selling amount at transaction time
m4_dnl
m4_dnl `-V --market`
m4_dnl : convert amounts to their market value in default valuation commodities
m4_dnl
m4_dnl `-X --exchange=COMM`
m4_dnl : convert amounts to their market value in commodity COMM
m4_dnl
m4_dnl `--value`
m4_dnl : convert amounts to cost or market value, more flexibly than -B/-V/-X
m4_dnl
m4_dnl `--infer-equity`
m4_dnl : infer conversion equity postings from costs
m4_dnl
m4_dnl `--infer-costs`
m4_dnl : infer costs from conversion equity postings
m4_dnl
m4_dnl `--infer-market-prices`
m4_dnl : use costs as additional market prices, as if they were P directives
m4_dnl
m4_dnl `--forecast`
m4_dnl : generate transactions from [periodic rules](hledger.html#periodic-transactions),
m4_dnl : between the latest recorded txn and 6 months from today,
m4_dnl : or during the specified PERIOD (= is required).
m4_dnl : Auto posting rules will be applied to these transactions as well.
m4_dnl : Also, in hledger-ui make future-dated transactions visible.
m4_dnl
m4_dnl `--auto`
m4_dnl : generate extra postings by applying [auto posting rules](hledger.html#auto-postings) to all txns (not just forecast txns)
m4_dnl
m4_dnl `--verbose-tags`
m4_dnl : add visible tags indicating transactions or postings which have been generated/modified
m4_dnl
m4_dnl `--commodity-style`
m4_dnl : Override the commodity style in the output for the specified commodity. For example 'EUR1.000,00'.
m4_dnl
m4_dnl `--color=WHEN (or --colour=WHEN)`
m4_dnl : Should color-supporting commands use ANSI color codes in text output.
m4_dnl : 'auto' (default): whenever stdout seems to be a color-supporting terminal.
m4_dnl : 'always' or 'yes': always, useful eg when piping output into 'less -R'.
m4_dnl : 'never' or 'no': never.
m4_dnl : A NO_COLOR environment variable overrides this.
m4_dnl
m4_dnl `--pretty[=WHEN]`
m4_dnl : Show prettier output, e.g. using unicode box-drawing characters.
m4_dnl : Accepts 'yes' (the default) or 'no' ('y', 'n', 'always', 'never' also work).
m4_dnl : If you provide an argument you must use '=', e.g. '--pretty=yes'.
m4_dnl
m4_dnl When a reporting option appears more than once in the command line, the last one takes precedence.
m4_dnl
m4_dnl Some reporting options can also be written as [query arguments](hledger.html#queries).
m4_dnl
m4_dnl }} )m4_dnl
m4_dnl
m4_dnl m4_define({{_generaloptions_}}, {{
m4_dnl
m4_dnl _inputoptions_
m4_dnl
m4_dnl _reportingoptions_
m4_dnl
m4_dnl _helpoptions_
m4_dnl
m4_dnl _optionnotes_
m4_dnl
m4_dnl }} )m4_dnl
m4_dnl
m4_dnl A standard description of hledger. m4_dnl A standard description of hledger.
m4_define({{_hledgerdescription_}}, {{ m4_define({{_hledgerdescription_}}, {{
hledger is a robust, user-friendly, cross-platform set of programs hledger is a robust, user-friendly, cross-platform set of programs

View File

@ -244,6 +244,10 @@ to most hledger commands. These options can be written anywhere on the command l
_generaloptions_ _generaloptions_
When a reporting option appears more than once in the command line, the last one takes precedence.
Some reporting options can also be written as [query arguments](#queries).
# Command line tips # Command line tips
Here are some details useful to know about for hledger command lines (and elsewhere). Here are some details useful to know about for hledger command lines (and elsewhere).