;doc: update CLI usage texts
This commit is contained in:
parent
8eb1e0883a
commit
2d9b6b91b5
@ -6,14 +6,23 @@ _FLAGS
|
||||
This command lists account names, either declared with account
|
||||
directives (--declared), posted to (--used), or both (the default). With
|
||||
query arguments, only matched account names and account names referenced
|
||||
by matched postings are shown. 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 the first few account name components.
|
||||
Account names can be depth-clipped with depth:N or --depth N or -N.
|
||||
by matched postings are shown.
|
||||
|
||||
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
|
||||
the first few account name components. Account names can be
|
||||
depth-clipped with depth:N or --depth N or -N.
|
||||
|
||||
With --types, it also shows each account's type, if it's known. (See
|
||||
Declaring accounts > Account types.)
|
||||
|
||||
With --positions, it also shows the file and line number of each
|
||||
account's declaration, if any, and the account's overall declaration
|
||||
order; these may be useful when troubleshooting account display order.
|
||||
|
||||
With --directives, it adds the account keyword, showing valid account
|
||||
directives which can be pasted into a journal file.
|
||||
|
||||
Examples:
|
||||
|
||||
$ hledger accounts
|
||||
|
||||
@ -15,6 +15,9 @@ hledger check # basic checks
|
||||
hledger check -s # basic + strict checks
|
||||
hledger check ordereddates payees # basic + two other checks
|
||||
|
||||
If you are an Emacs user, you can also configure flycheck-hledger to run
|
||||
these checks, providing instant feedback as you edit the journal.
|
||||
|
||||
Here are the checks currently available:
|
||||
|
||||
Basic checks
|
||||
@ -57,8 +60,7 @@ therefore optional:
|
||||
- payees - all payees used by transactions have been declared
|
||||
|
||||
- recentassertions - all accounts with balance assertions have a
|
||||
balance assertion, marked cleared, within 7 days of their latest
|
||||
posting
|
||||
balance assertion no more than 7 days before their latest posting
|
||||
|
||||
- uniqueleafnames - all account leaf names are unique
|
||||
|
||||
@ -75,3 +77,17 @@ https://github.com/simonmichael/hledger/tree/master/bin:
|
||||
|
||||
You could make similar scripts to perform your own custom checks. See:
|
||||
Cookbook -> Scripting.
|
||||
|
||||
More about specific checks
|
||||
|
||||
hledger check recentassertions will complain if any balance-asserted
|
||||
account does not have a balance assertion within 7 days before its
|
||||
latest posting. This aims to prevent the situation where you are
|
||||
regularly updating your journal, but forgetting to check your balances
|
||||
against the real world, then one day must dig back through months of
|
||||
data to find an error. It assumes that adding a balance assertion
|
||||
requires/reminds you to check the real-world balance. That may not be
|
||||
true if you auto-generate balance assertions from bank data; in that
|
||||
case, I recommend to import transactions uncleared, then use the
|
||||
manual-review-and-mark-cleared phase as a reminder to check the latest
|
||||
assertions against real-world balances.
|
||||
|
||||
@ -2,11 +2,9 @@ help
|
||||
Show the hledger user manual in one of several formats, optionally
|
||||
positioned at a given TOPIC (if possible).
|
||||
|
||||
TOPIC is any heading in the manual, or the start of any heading (but not
|
||||
the middle). It is case insensitive.
|
||||
|
||||
Some examples: commands, print, forecast, "auto postings",
|
||||
"commodity column".
|
||||
TOPIC is any heading in the manual, or a heading prefix, case
|
||||
insensitive. Eg: commands, print, forecast, "auto postings", journal,
|
||||
amount.
|
||||
|
||||
_FLAGS
|
||||
|
||||
@ -18,3 +16,9 @@ By default it uses the best viewer it can find in $PATH, in this order:
|
||||
info, man, $PAGER (unless a topic is specified), less, or stdout. When
|
||||
run non-interactively, it always uses stdout. Or you can select a
|
||||
particular viewer with the -i (info), -m (man), or -p (pager) flags.
|
||||
|
||||
Examples
|
||||
|
||||
$ hledger help --help # show how the help command works
|
||||
$ hledger help # show the hledger manual with info, man or $PAGER
|
||||
$ hledger help journal # show the journal topic in the hledger manual
|
||||
|
||||
Loading…
Reference in New Issue
Block a user