;doc: update embedded manuals

This commit is contained in:
Simon Michael 2025-06-14 18:10:44 -10:00
parent e473fc9794
commit 245a0bec62
3 changed files with 343 additions and 300 deletions

View File

@ -8942,14 +8942,15 @@ if any (entered in a comment following the amount), will influence
assertion checking. assertion checking.
.PP .PP
You can use \f[CR]\-I\f[R]/\f[CR]\-\-ignore\-assertions\f[R] to disable You can use \f[CR]\-I\f[R]/\f[CR]\-\-ignore\-assertions\f[R] to disable
this assertion checking. assertion checking temporarily.
.SS add and balance assignments .SS add and balance assignments
You can\[aq]t add new postings which are dated earlier than a balance Balance assignments are not recalculated during a \f[CR]hledger add\f[R]
assignment, currently. session.
It\[aq]s because balance assignments are performed once, before When \f[CR]add\f[R] runs, it sees the journal with all balance
\f[CR]add\f[R]; by the time \f[CR]add\f[R] runs, all amounts in the assignments already processed and converted to assertions.
journal are explicit, and assignments have become assertions. So if you add a new posting which is dated earlier than a balance
(#2406). assignment, it will break the assertion and be rejected.
You can make it work by using \f[CR]hledger add \-I\f[R].
.SS import .SS import
Import new transactions from one or more data files to the main journal. Import new transactions from one or more data files to the main journal.
.IP .IP
@ -9186,39 +9187,32 @@ A new CSV record generates a journal entry identical to one(s) already
in the journal. in the journal.
.SH Basic report commands .SH Basic report commands
.SS accounts .SS accounts
List account names. List the account names used or declared in the journal.
.IP .IP
.EX .EX
Flags: Flags:
\-u \-\-used show only accounts used by transactions \-u \-\-used list accounts used
\-d \-\-declared show only accounts declared by account directive \-d \-\-declared list accounts declared
\-\-unused show only accounts declared but not used \-\-undeclared list accounts used but not declared
\-\-undeclared show only accounts used but not declared \-\-unused list accounts declared but not used
\-\-find list the first account matched by the first
argument (a case\-insensitive infix regexp)
\-\-types also show account types when known \-\-types also show account types when known
\-\-positions also show where accounts were declared \-\-positions also show where accounts were declared
\-\-directives show as account directives, for use in journals \-\-directives show as account directives, for use in journals
\-\-find find the first account matched by the first
argument (a case\-insensitive infix regexp or
account name)
\-l \-\-flat list/tree mode: show accounts as a flat list \-l \-\-flat list/tree mode: show accounts as a flat list
(default) (default)
\-t \-\-tree list/tree mode: show accounts as a tree \-t \-\-tree list/tree mode: show accounts as a tree
\-\-drop=N flat mode: omit N leading account name parts \-\-drop=N flat mode: omit N leading account name parts
.EE .EE
.PP .PP
This command lists account names. This command lists account names \- all of them by default.
By default it shows all known accounts, either used in transactions or or just the ones which have been used in transactions, or declared with
declared with account directives. \f[CR]account\f[R] directives, or used but not declared, or declared but
not used, or just the first account name matched by a pattern.
.PP .PP
With query arguments, only matched account names and account names You can add query arguments to select a subset of transactions or
referenced by matched postings are shown. accounts.
.PP
Or it can show just the used accounts
(\f[CR]\-\-used\f[R]/\f[CR]\-u\f[R]), the declared accounts
(\f[CR]\-\-declared\f[R]/\f[CR]\-d\f[R]), the accounts declared but not
used (\f[CR]\-\-unused\f[R]), the accounts used but not declared
(\f[CR]\-\-undeclared\f[R]), or the first account matched by an account
name pattern, if any (\f[CR]\-\-find\f[R]).
.PP .PP
It shows a flat list by default. It shows a flat list by default.
With \f[CR]\-\-tree\f[R], it uses indentation to show the account With \f[CR]\-\-tree\f[R], it uses indentation to show the account
@ -9237,9 +9231,8 @@ each account\[aq]s declaration, if any, and the account\[aq]s overall
declaration order; these may be useful when troubleshooting account declaration order; these may be useful when troubleshooting account
display order. display order.
.PP .PP
With \f[CR]\-\-directives\f[R], it adds the \f[CR]account\f[R] keyword, With \f[CR]\-\-directives\f[R], it shows valid account directives which
showing valid account directives which can be pasted into a journal could be pasted into a journal file.
file.
This is useful together with \f[CR]\-\-undeclared\f[R] when updating This is useful together with \f[CR]\-\-undeclared\f[R] when updating
your account declarations to satisfy \f[CR]hledger check accounts\f[R]. your account declarations to satisfy \f[CR]hledger check accounts\f[R].
.PP .PP
@ -9322,14 +9315,24 @@ $ hledger codes \-E
126 126
.EE .EE
.SS commodities .SS commodities
List all commodity/currency symbols used or declared in the journal. List the commodity symbols used or declared in the journal.
.IP .IP
.EX .EX
Flags: Flags:
no command\-specific flags \-\-used list commodities used
\-\-declared list commodities declared
\-\-undeclared list commodities used but not declared
\-\-unused list commodities declared but not used
.EE .EE
.PP
This command lists commodity symbols/names \- all of them by default, or
just the ones which have been used in transactions or \f[CR]P\f[R]
directives, or declared with \f[CR]commodity\f[R] directives, or used
but not declared, or declared but not used.
.PP
You can add cur: query arguments to further limit the commodities.
.SS descriptions .SS descriptions
List the unique descriptions that appear in transactions. List the unique descriptions used in transactions.
.IP .IP
.EX .EX
Flags: Flags:
@ -9379,23 +9382,26 @@ Petrol
Snacks Snacks
.EE .EE
.SS payees .SS payees
List the unique payee/payer names that appear in transactions. List the payee/payer names used or declared in the journal.
.IP .IP
.EX .EX
Flags: Flags:
\-\-declared show payees declared with payee directives \-\-used list payees used
\-\-used show payees referenced by transactions \-\-declared list payees declared
\-\-undeclared list payees used but not declared
\-\-unused list payees declared but not used
.EE .EE
.PP .PP
This command lists unique payee/payer names which have been declared This command lists unique payee/payer names \- all of them by default,
with payee directives (\-\-declared), used in transaction descriptions or just the ones which have been used in transaction descriptions, or
(\-\-used), or both (the default). declared with \f[CR]payee\f[R] directives, or used but not declared, or
declared but not used.
.PP .PP
The payee/payer is the part of the transaction description before a | The payee/payer name is the part of the transaction description before a
character (or if there is no |, the whole description). | character (or if there is no |, the whole description).
.PP .PP
You can add query arguments to select a subset of transactions. You can add query arguments to select a subset of transactions or
This implies \-\-used. payees.
.PP .PP
Example: Example:
.IP .IP
@ -9483,37 +9489,43 @@ Runtime stats : 0.12 s elapsed, 8266 txns/s, 4 MB live, 16 MB alloc
This command supports the \-o/\-\-output\-file option (but not This command supports the \-o/\-\-output\-file option (but not
\-O/\-\-output\-format). \-O/\-\-output\-format).
.SS tags .SS tags
List the tags used in the journal, or their values. List the tag names used or declared in the journal, or their values.
.IP .IP
.EX .EX
Flags: Flags:
\-\-used list tags used
\-\-declared list tags declared
\-\-undeclared list tags used but not declared
\-\-unused list tags declared but not used
\-\-values list tag values instead of tag names \-\-values list tag values instead of tag names
\-\-parsed show tags/values in the order they were parsed, \-\-parsed show them in the order they were parsed (mostly),
including duplicates including duplicates
.EE .EE
.PP .PP
This command lists the tag names used in the journal, whether on This command lists tag names \- all of them by default, or just the ones
transactions, postings, or account declarations. which have been used on transactions/postings/accounts, or declared with
\f[CR]tag\f[R] directives, or used but not declared, or declared but not
used.
.PP .PP
With a TAGREGEX argument, only tag names matching this regular You can add one TAGREGEX argument, to show only tags whose name is
expression (case insensitive, infix matched) are shown. matched by this case\-insensitive, infix\-matching regular expression.
.PP .PP
With QUERY arguments, only transactions and accounts matching this query After that, you can add query arguments to filter the transactions,
are considered. postings, or accounts providing tags.
If the query involves transaction fields (date:, desc:, amt:, ...), the
search is restricted to the matched transactions and their accounts.
.PP .PP
With the \-\-values flag, the tags\[aq] unique non\-empty values are With \f[CR]\-\-values\f[R], the tags\[aq] unique non\-empty values are
listed instead. listed instead.
With \-E/\-\-empty, blank/empty values are also shown.
.PP .PP
With \-\-parsed, tags or values are shown in the order they were parsed, With \f[CR]\-E\f[R]/\f[CR]\-\-empty\f[R], blank/empty values are also
with duplicates included. shown.
.PP
With \f[CR]\-\-parsed\f[R], tags or values are shown in the order they
were parsed, with duplicates included.
(Except, tags from account declarations are always shown first.) (Except, tags from account declarations are always shown first.)
.PP .PP
Tip: remember, accounts also acquire tags from their parents, postings Remember that accounts also acquire tags from their parents; postings
also acquire tags from their account and transaction, transactions also also acquire tags from their account and transaction; and transactions
acquire tags from their postings. also acquire tags from their postings.
.SH Standard report commands .SH Standard report commands
.SS print .SS print
Show full journal entries, representing transactions. Show full journal entries, representing transactions.
@ -9541,7 +9553,7 @@ Flags:
\-\-base\-url=URLPREFIX in html output, generate links to hledger\-web, \-\-base\-url=URLPREFIX in html output, generate links to hledger\-web,
with this prefix. (Usually the base url shown by with this prefix. (Usually the base url shown by
hledger\-web; can also be relative.) hledger\-web; can also be relative.)
\-\-location add file/line number tags to print output \-\-location add tags showing file paths and line numbers
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, beancount, csv, tsv, html, fods, json, sql. txt, beancount, csv, tsv, html, fods, json, sql.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching

View File

@ -8614,8 +8614,8 @@ journal format.
(entered in a comment following the amount), will influence assertion (entered in a comment following the amount), will influence assertion
checking. checking.
You can use '-I'/'--ignore-assertions' to disable this assertion You can use '-I'/'--ignore-assertions' to disable assertion checking
checking. temporarily.
 
File: hledger.info, Node: add and balance assignments, Next: import, Prev: add and balance assertions, Up: Data entry commands File: hledger.info, Node: add and balance assignments, Next: import, Prev: add and balance assertions, Up: Data entry commands
@ -8623,10 +8623,12 @@ File: hledger.info, Node: add and balance assignments, Next: import, Prev: ad
26.3 add and balance assignments 26.3 add and balance assignments
================================ ================================
You can't add new postings which are dated earlier than a balance Balance assignments are not recalculated during a 'hledger add' session.
assignment, currently. It's because balance assignments are performed When 'add' runs, it sees the journal with all balance assignments
once, before 'add'; by the time 'add' runs, all amounts in the journal already processed and converted to assertions. So if you add a new
are explicit, and assignments have become assertions. (#2406). posting which is dated earlier than a balance assignment, it will break
the assertion and be rejected. You can make it work by using 'hledger
add -I'.
 
File: hledger.info, Node: import, Prev: add and balance assignments, Up: Data entry commands File: hledger.info, Node: import, Prev: add and balance assignments, Up: Data entry commands
@ -8890,35 +8892,30 @@ File: hledger.info, Node: accounts, Next: codes, Up: Basic report commands
27.1 accounts 27.1 accounts
============= =============
List account names. List the account names used or declared in the journal.
Flags: Flags:
-u --used show only accounts used by transactions -u --used list accounts used
-d --declared show only accounts declared by account directive -d --declared list accounts declared
--unused show only accounts declared but not used --undeclared list accounts used but not declared
--undeclared show only accounts used but not declared --unused list accounts declared but not used
--find list the first account matched by the first
argument (a case-insensitive infix regexp)
--types also show account types when known --types also show account types when known
--positions also show where accounts were declared --positions also show where accounts were declared
--directives show as account directives, for use in journals --directives show as account directives, for use in journals
--find find the first account matched by the first
argument (a case-insensitive infix regexp or
account name)
-l --flat list/tree mode: show accounts as a flat list -l --flat list/tree mode: show accounts as a flat list
(default) (default)
-t --tree list/tree mode: show accounts as a tree -t --tree list/tree mode: show accounts as a tree
--drop=N flat mode: omit N leading account name parts --drop=N flat mode: omit N leading account name parts
This command lists account names. By default it shows all known This command lists account names - all of them by default. or just
accounts, either used in transactions or declared with account the ones which have been used in transactions, or declared with
directives. 'account' directives, or used but not declared, or declared but not
used, or just the first account name matched by a pattern.
With query arguments, only matched account names and account names You can add query arguments to select a subset of transactions or
referenced by matched postings are shown. accounts.
Or it can show just the used accounts ('--used'/'-u'), the declared
accounts ('--declared'/'-d'), the accounts declared but not used
('--unused'), 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 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 to show the account hierarchy. In flat mode you can add '--drop N' to
@ -8932,10 +8929,10 @@ depth-clipped with 'depth:N' or '--depth N' or '-N'.
account's declaration, if any, and the account's overall declaration 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 With '--directives', it shows valid account directives which could be
account directives which can be pasted into a journal file. This is pasted into a journal file. This is useful together with '--undeclared'
useful together with '--undeclared' when updating your account when updating your account declarations to satisfy 'hledger check
declarations to satisfy 'hledger check accounts'. accounts'.
The '--find' flag can be used to look up a single account name, in 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 the same way that the 'aregister' command does. It returns the
@ -9014,10 +9011,20 @@ File: hledger.info, Node: commodities, Next: descriptions, Prev: codes, Up:
27.3 commodities 27.3 commodities
================ ================
List all commodity/currency symbols used or declared in the journal. List the commodity symbols used or declared in the journal.
Flags: Flags:
no command-specific flags --used list commodities used
--declared list commodities declared
--undeclared list commodities used but not declared
--unused list commodities declared but not used
This command lists commodity symbols/names - all of them by default,
or just the ones which have been used in transactions or 'P' directives,
or declared with 'commodity' directives, or used but not declared, or
declared but not used.
You can add cur: query arguments to further limit the commodities.
 
File: hledger.info, Node: descriptions, Next: files, Prev: commodities, Up: Basic report commands File: hledger.info, Node: descriptions, Next: files, Prev: commodities, Up: Basic report commands
@ -9025,7 +9032,7 @@ File: hledger.info, Node: descriptions, Next: files, Prev: commodities, Up:
27.4 descriptions 27.4 descriptions
================= =================
List the unique descriptions that appear in transactions. List the unique descriptions used in transactions.
Flags: Flags:
no command-specific flags no command-specific flags
@ -9081,21 +9088,24 @@ File: hledger.info, Node: payees, Next: prices, Prev: notes, Up: Basic repor
27.7 payees 27.7 payees
=========== ===========
List the unique payee/payer names that appear in transactions. List the payee/payer names used or declared in the journal.
Flags: Flags:
--declared show payees declared with payee directives --used list payees used
--used show payees referenced by transactions --declared list payees declared
--undeclared list payees used but not declared
--unused list payees declared but not used
This command lists unique payee/payer names which have been declared This command lists unique payee/payer names - all of them by default,
with payee directives (-declared), used in transaction descriptions or just the ones which have been used in transaction descriptions, or
(-used), or both (the default). declared with 'payee' directives, or used but not declared, or declared
but not used.
The payee/payer is the part of the transaction description before a | The payee/payer name is the part of the transaction description
character (or if there is no |, the whole description). before a | character (or if there is no |, the whole description).
You can add query arguments to select a subset of transactions. This You can add query arguments to select a subset of transactions or
implies -used. payees.
Example: Example:
@ -9187,34 +9197,40 @@ File: hledger.info, Node: tags, Prev: stats, Up: Basic report commands
27.10 tags 27.10 tags
========== ==========
List the tags used in the journal, or their values. List the tag names used or declared in the journal, or their values.
Flags: Flags:
--used list tags used
--declared list tags declared
--undeclared list tags used but not declared
--unused list tags declared but not used
--values list tag values instead of tag names --values list tag values instead of tag names
--parsed show tags/values in the order they were parsed, --parsed show them in the order they were parsed (mostly),
including duplicates including duplicates
This command lists the tag names used in the journal, whether on This command lists tag names - all of them by default, or just the
transactions, postings, or account declarations. ones which have been used on transactions/postings/accounts, or declared
with 'tag' directives, or used but not declared, or declared but not
used.
With a TAGREGEX argument, only tag names matching this regular You can add one TAGREGEX argument, to show only tags whose name is
expression (case insensitive, infix matched) are shown. matched by this case-insensitive, infix-matching regular expression.
With QUERY arguments, only transactions and accounts matching this After that, you can add query arguments to filter the transactions,
query are considered. If the query involves transaction fields (date:, postings, or accounts providing tags.
desc:, amt:, ...), the search is restricted to the matched transactions
and their accounts.
With the -values flag, the tags' unique non-empty values are listed With '--values', the tags' unique non-empty values are listed
instead. With -E/-empty, blank/empty values are also shown. instead.
With -parsed, tags or values are shown in the order they were parsed, With '-E'/'--empty', blank/empty values are also shown.
with duplicates included. (Except, tags from account declarations are
always shown first.)
Tip: remember, accounts also acquire tags from their parents, With '--parsed', tags or values are shown in the order they were
postings also acquire tags from their account and transaction, parsed, with duplicates included. (Except, tags from account
transactions also acquire tags from their postings. declarations are always shown first.)
Remember that accounts also acquire tags from their parents; postings
also acquire tags from their account and transaction; and transactions
also acquire tags from their postings.
 
File: hledger.info, Node: Standard report commands, Next: Advanced report commands, Prev: Basic report commands, Up: Top File: hledger.info, Node: Standard report commands, Next: Advanced report commands, Prev: Basic report commands, Up: Top
@ -9262,7 +9278,7 @@ Flags:
--base-url=URLPREFIX in html output, generate links to hledger-web, --base-url=URLPREFIX in html output, generate links to hledger-web,
with this prefix. (Usually the base url shown by with this prefix. (Usually the base url shown by
hledger-web; can also be relative.) hledger-web; can also be relative.)
--location add file/line number tags to print output --location add tags showing file paths and line numbers
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, beancount, csv, tsv, html, fods, json, sql. txt, beancount, csv, tsv, html, fods, json, sql.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -13113,116 +13129,116 @@ Node: web310211
Node: Data entry commands310339 Node: Data entry commands310339
Node: add310600 Node: add310600
Node: add and balance assertions313075 Node: add and balance assertions313075
Node: add and balance assignments313792 Node: add and balance assignments313799
Node: import314266 Node: import314360
Node: Import preview315324 Node: Import preview315418
Node: Overlap detection316272 Node: Overlap detection316366
Node: First import319158 Node: First import319252
Node: Importing balance assignments320353 Node: Importing balance assignments320447
Node: Import and commodity styles321408 Node: Import and commodity styles321502
Node: Import special cases321846 Node: Import special cases321940
Node: Basic report commands323181 Node: Basic report commands323275
Node: accounts323482 Node: accounts323576
Node: codes326415 Node: codes326222
Node: commodities327437 Node: commodities327244
Node: descriptions327681 Node: descriptions328001
Node: files328148 Node: files328461
Node: notes328445 Node: notes328758
Node: payees328957 Node: payees329270
Node: prices329741 Node: prices330182
Node: stats330633 Node: stats331074
Node: tags332374 Node: tags332815
Node: Standard report commands333681 Node: Standard report commands334352
Node: print333986 Node: print334657
Node: print explicitness336797 Node: print explicitness337471
Node: print amount style337717 Node: print amount style338391
Node: print parseability338955 Node: print parseability339629
Node: print other features339874 Node: print other features340548
Node: print output format340835 Node: print output format341509
Node: aregister344120 Node: aregister344794
Node: aregister and posting dates348673 Node: aregister and posting dates349347
Node: register349574 Node: register350248
Node: Custom register output356815 Node: Custom register output357489
Node: balancesheet358000 Node: balancesheet358674
Node: balancesheetequity362965 Node: balancesheetequity363639
Node: cashflow368300 Node: cashflow368974
Node: incomestatement373113 Node: incomestatement373787
Node: Advanced report commands377962 Node: Advanced report commands378636
Node: balance378170 Node: balance378844
Node: balance features383591 Node: balance features384265
Node: Simple balance report385694 Node: Simple balance report386368
Node: Balance report line format387504 Node: Balance report line format388178
Node: Filtered balance report389864 Node: Filtered balance report390538
Node: List or tree mode390383 Node: List or tree mode391057
Node: Depth limiting391896 Node: Depth limiting392570
Node: Dropping top-level accounts392663 Node: Dropping top-level accounts393337
Node: Showing declared accounts393173 Node: Showing declared accounts393847
Node: Sorting by amount393903 Node: Sorting by amount394577
Node: Percentages394757 Node: Percentages395431
Node: Multi-period balance report395464 Node: Multi-period balance report396138
Node: Balance change end balance398216 Node: Balance change end balance398890
Node: Balance report modes399853 Node: Balance report modes400527
Node: Calculation mode400532 Node: Calculation mode401206
Node: Accumulation mode401236 Node: Accumulation mode401910
Node: Valuation mode402337 Node: Valuation mode403011
Node: Combining balance report modes403681 Node: Combining balance report modes404355
Node: Budget report405711 Node: Budget report406385
Node: Using the budget report408011 Node: Using the budget report408685
Node: Budget date surprises410287 Node: Budget date surprises410961
Node: Selecting budget goals411651 Node: Selecting budget goals412325
Node: Budgeting vs forecasting412599 Node: Budgeting vs forecasting413273
Node: Balance report layout414276 Node: Balance report layout414950
Node: Wide layout415481 Node: Wide layout416155
Node: Tall layout417886 Node: Tall layout418560
Node: Bare layout419192 Node: Bare layout419866
Node: Tidy layout421256 Node: Tidy layout421930
Node: Balance report output422800 Node: Balance report output423474
Node: Some useful balance reports423574 Node: Some useful balance reports424248
Node: roi424834 Node: roi425508
Node: Spaces and special characters in --inv and --pnl427081 Node: Spaces and special characters in --inv and --pnl427755
Node: Semantics of --inv and --pnl427807 Node: Semantics of --inv and --pnl428481
Node: IRR and TWR explained429894 Node: IRR and TWR explained430568
Node: Chart commands433305 Node: Chart commands433979
Node: activity433486 Node: activity434160
Node: Data generation commands433983 Node: Data generation commands434657
Node: close434189 Node: close434863
Node: close --clopen436752 Node: close --clopen437426
Node: close --close438926 Node: close --close439600
Node: close --open439450 Node: close --open440124
Node: close --assert439700 Node: close --assert440374
Node: close --assign440027 Node: close --assign440701
Node: close --retain440706 Node: close --retain441380
Node: close customisation441563 Node: close customisation442237
Node: close and balance assertions443207 Node: close and balance assertions443881
Node: close examples444729 Node: close examples445403
Node: Retain earnings444966 Node: Retain earnings445640
Node: Migrate balances to a new file445469 Node: Migrate balances to a new file446143
Node: More detailed close examples446831 Node: More detailed close examples447505
Node: rewrite447053 Node: rewrite447727
Node: Re-write rules in a file449625 Node: Re-write rules in a file450299
Node: Diff output format450935 Node: Diff output format451609
Node: rewrite vs print --auto452208 Node: rewrite vs print --auto452882
Node: Maintenance commands452922 Node: Maintenance commands453596
Node: check453141 Node: check453815
Node: Basic checks454223 Node: Basic checks454897
Node: Strict checks455244 Node: Strict checks455918
Node: Other checks456181 Node: Other checks456855
Node: Custom checks457933 Node: Custom checks458607
Node: diff458388 Node: diff459062
Node: setup459596 Node: setup460270
Node: test462463 Node: test463137
Node: PART 5 COMMON TASKS463366 Node: PART 5 COMMON TASKS464040
Node: Getting help463599 Node: Getting help464273
Node: Constructing command lines464508 Node: Constructing command lines465182
Node: Starting a journal file465346 Node: Starting a journal file466020
Node: Setting LEDGER_FILE466730 Node: Setting LEDGER_FILE467404
Node: Setting opening balances467988 Node: Setting opening balances468662
Node: Recording transactions471310 Node: Recording transactions471984
Node: Reconciling472035 Node: Reconciling472709
Node: Reporting474424 Node: Reporting475098
Node: Migrating to a new file478538 Node: Migrating to a new file479212
Node: BUGS478987 Node: BUGS479661
Node: Troubleshooting479955 Node: Troubleshooting480629
 
End Tag Table End Tag Table

View File

@ -6923,13 +6923,15 @@ Data entry commands
(entered in a comment following the amount), will influence assertion (entered in a comment following the amount), will influence assertion
checking. checking.
You can use -I/--ignore-assertions to disable this assertion checking. You can use -I/--ignore-assertions to disable assertion checking tem-
porarily.
add and balance assignments add and balance assignments
You can't add new postings which are dated earlier than a balance as- Balance assignments are not recalculated during a hledger add session.
signment, currently. It's because balance assignments are performed When add runs, it sees the journal with all balance assignments already
once, before add; by the time add runs, all amounts in the journal are processed and converted to assertions. So if you add a new posting
explicit, and assignments have become assertions. (#2406). which is dated earlier than a balance assignment, it will break the as-
sertion and be rejected. You can make it work by using hledger add -I.
import import
Import new transactions from one or more data files to the main jour- Import new transactions from one or more data files to the main jour-
@ -7132,35 +7134,30 @@ Data entry commands
Basic report commands Basic report commands
accounts accounts
List account names. List the account names used or declared in the journal.
Flags: Flags:
-u --used show only accounts used by transactions -u --used list accounts used
-d --declared show only accounts declared by account directive -d --declared list accounts declared
--unused show only accounts declared but not used --undeclared list accounts used but not declared
--undeclared show only accounts used but not declared --unused list accounts declared but not used
--find list the first account matched by the first
argument (a case-insensitive infix regexp)
--types also show account types when known --types also show account types when known
--positions also show where accounts were declared --positions also show where accounts were declared
--directives show as account directives, for use in journals --directives show as account directives, for use in journals
--find find the first account matched by the first
argument (a case-insensitive infix regexp or
account name)
-l --flat list/tree mode: show accounts as a flat list -l --flat list/tree mode: show accounts as a flat list
(default) (default)
-t --tree list/tree mode: show accounts as a tree -t --tree list/tree mode: show accounts as a tree
--drop=N flat mode: omit N leading account name parts --drop=N flat mode: omit N leading account name parts
This command lists account names. By default it shows all known ac- This command lists account names - all of them by default. or just the
counts, either used in transactions or declared with account direc- ones which have been used in transactions, or declared with account di-
tives. rectives, or used but not declared, or declared but not used, or just
the first account name matched by a pattern.
With query arguments, only matched account names and account names ref- You can add query arguments to select a subset of transactions or ac-
erenced by matched postings are shown. counts.
Or it can show just the used accounts (--used/-u), the declared ac-
counts (--declared/-d), the accounts declared but not used (--unused),
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
@ -7174,14 +7171,14 @@ Basic report commands
count's declaration, if any, and the account's overall declaration or- count's declaration, if any, and the account's overall declaration or-
der; these may be useful when troubleshooting account display order. der; these may be useful when troubleshooting account display order.
With --directives, it adds the account keyword, showing valid account With --directives, it shows valid account directives which could be
directives which can be pasted into a journal file. This is useful to- pasted into a journal file. This is useful together with --undeclared
gether with --undeclared when updating your account declarations to when updating your account declarations to satisfy hledger check ac-
satisfy hledger check accounts. counts.
The --find flag can be used to look up a single account name, in the 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 alphanumeri- same way that the aregister command does. It returns the alphanumeri-
cally-first matched account name, or if none can be found, it fails cally-first matched account name, or if none can be found, it fails
with a non-zero exit code. with a non-zero exit code.
Examples: Examples:
@ -7205,13 +7202,13 @@ Basic report commands
Flags: Flags:
no command-specific flags no command-specific flags
This command prints the value of each transaction's code field, in the This command prints the value of each transaction's code field, in the
order transactions were parsed. The transaction code is an optional order transactions were parsed. The transaction code is an optional
value written in parentheses between the date and description, often value written in parentheses between the date and description, often
used to store a cheque number, order number or similar. used to store a cheque number, order number or similar.
Transactions aren't required to have a code, and missing or empty codes Transactions aren't required to have a code, and missing or empty codes
will not be shown by default. With the -E/--empty flag, they will be will not be shown by default. With the -E/--empty flag, they will be
printed as blank lines. printed as blank lines.
You can add a query to select a subset of transactions. You can add a query to select a subset of transactions.
@ -7246,19 +7243,29 @@ Basic report commands
126 126
commodities commodities
List all commodity/currency symbols used or declared in the journal. List the commodity symbols used or declared in the journal.
Flags: Flags:
no command-specific flags --used list commodities used
--declared list commodities declared
--undeclared list commodities used but not declared
--unused list commodities declared but not used
This command lists commodity symbols/names - all of them by default, or
just the ones which have been used in transactions or P directives, or
declared with commodity directives, or used but not declared, or de-
clared but not used.
You can add cur: query arguments to further limit the commodities.
descriptions descriptions
List the unique descriptions that appear in transactions. List the unique descriptions used in transactions.
Flags: Flags:
no command-specific flags no command-specific flags
This command lists the unique descriptions that appear in transactions, This command lists the unique descriptions that appear in transactions,
in alphabetic order. You can add a query to select a subset of trans- in alphabetic order. You can add a query to select a subset of trans-
actions. actions.
Example: Example:
@ -7269,7 +7276,7 @@ Basic report commands
Person A Person A
files files
List all files included in the journal. With a REGEX argument, only List all files included in the journal. With a REGEX argument, only
file names matching the regular expression (case sensitive) are shown. file names matching the regular expression (case sensitive) are shown.
Flags: Flags:
@ -7282,8 +7289,8 @@ Basic report commands
no command-specific flags no command-specific flags
This command lists the unique notes that appear in transactions, in al- This command lists the unique notes that appear in transactions, in al-
phabetic order. You can add a query to select a subset of transac- phabetic order. You can add a query to select a subset of transac-
tions. The note is the part of the transaction description after a | tions. The note is the part of the transaction description after a |
character (or if there is no |, the whole description). character (or if there is no |, the whole description).
Example: Example:
@ -7293,21 +7300,24 @@ Basic report commands
Snacks Snacks
payees payees
List the unique payee/payer names that appear in transactions. List the payee/payer names used or declared in the journal.
Flags: Flags:
--declared show payees declared with payee directives --used list payees used
--used show payees referenced by transactions --declared list payees declared
--undeclared list payees used but not declared
--unused list payees declared but not used
This command lists unique payee/payer names which have been declared This command lists unique payee/payer names - all of them by default,
with payee directives (--declared), used in transaction descriptions or just the ones which have been used in transaction descriptions, or
(--used), or both (the default). declared with payee directives, or used but not declared, or declared
but not used.
The payee/payer is the part of the transaction description before a | The payee/payer name is the part of the transaction description before
character (or if there is no |, the whole description). a | character (or if there is no |, the whole description).
You can add query arguments to select a subset of transactions. This You can add query arguments to select a subset of transactions or pay-
implies --used. ees.
Example: Example:
@ -7385,34 +7395,39 @@ Basic report commands
put-format). put-format).
tags tags
List the tags used in the journal, or their values. List the tag names used or declared in the journal, or their values.
Flags: Flags:
--used list tags used
--declared list tags declared
--undeclared list tags used but not declared
--unused list tags declared but not used
--values list tag values instead of tag names --values list tag values instead of tag names
--parsed show tags/values in the order they were parsed, --parsed show them in the order they were parsed (mostly),
including duplicates including duplicates
This command lists the tag names used in the journal, whether on trans- This command lists tag names - all of them by default, or just the ones
actions, postings, or account declarations. which have been used on transactions/postings/accounts, or declared
with tag directives, or used but not declared, or declared but not
used.
With a TAGREGEX argument, only tag names matching this regular expres- You can add one TAGREGEX argument, to show only tags whose name is
sion (case insensitive, infix matched) are shown. matched by this case-insensitive, infix-matching regular expression.
With QUERY arguments, only transactions and accounts matching this After that, you can add query arguments to filter the transactions,
query are considered. If the query involves transaction fields (date:, postings, or accounts providing tags.
desc:, amt:, ...), the search is restricted to the matched transactions
and their accounts.
With the --values flag, the tags' unique non-empty values are listed With --values, the tags' unique non-empty values are listed instead.
instead. With -E/--empty, blank/empty values are also shown.
With --parsed, tags or values are shown in the order they were parsed, With -E/--empty, blank/empty values are also shown.
with duplicates included. (Except, tags from account declarations are
With --parsed, tags or values are shown in the order they were parsed,
with duplicates included. (Except, tags from account declarations are
always shown first.) always shown first.)
Tip: remember, accounts also acquire tags from their parents, postings Remember that accounts also acquire tags from their parents; postings
also acquire tags from their account and transaction, transactions also also acquire tags from their account and transaction; and transactions
acquire tags from their postings. also acquire tags from their postings.
Standard report commands Standard report commands
print print
@ -7440,7 +7455,7 @@ Standard report commands
--base-url=URLPREFIX in html output, generate links to hledger-web, --base-url=URLPREFIX in html output, generate links to hledger-web,
with this prefix. (Usually the base url shown by with this prefix. (Usually the base url shown by
hledger-web; can also be relative.) hledger-web; can also be relative.)
--location add file/line number tags to print output --location add tags showing file paths and line numbers
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, beancount, csv, tsv, html, fods, json, sql. txt, beancount, csv, tsv, html, fods, json, sql.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching