;doc: update CLI usage texts

This commit is contained in:
Simon Michael 2022-10-05 08:42:09 -10:00
parent 3e42851958
commit 360ef833ae

View File

@ -3,10 +3,16 @@ Show account names.
_FLAGS _FLAGS
This command lists account names, either declared with account This command lists account names. By default it shows all known
directives (--declared), posted to (--used), or both (the default). With accounts, either used in transactions or declared with account
query arguments, only matched account names and account names referenced directives.
by matched postings are shown.
With query arguments, only matched account names and account names
referenced by matched postings are shown.
Or it can show just the used accounts (--used), the declared accounts
(--declared), the accounts used but not declared (--undeclared), or the
first account matched by an account name pattern, if any (--find).
It shows a flat list by default. With --tree, it uses indentation to It shows a flat list by default. With --tree, it uses indentation to
show the account hierarchy. In flat mode you can add --drop N to omit show the account hierarchy. In flat mode you can add --drop N to omit
@ -21,7 +27,14 @@ account's declaration, if any, and the account's overall declaration
order; these may be useful when troubleshooting account display order. order; these may be useful when troubleshooting account display order.
With --directives, it adds the account keyword, showing valid account With --directives, it adds the account keyword, showing valid account
directives which can be pasted into a journal file. directives which can be pasted into a journal file. This is useful
together with --undeclared to update your account declarations when
check accounts reports undeclared accounts.
The --find flag can be used to look up a single account name, in the
same way that the aregister command does. It returns the
alphanumerically-first matched account name, or if none can be found, it
fails with a non-zero exit code.
Examples: Examples:
@ -34,3 +47,6 @@ expenses:supplies
income:gifts income:gifts
income:salary income:salary
liabilities:debts liabilities:debts
$ hledger accounts --undeclared --directives >> $LEDGER_FILE
$ hledger check accounts