;doc: update manuals

This commit is contained in:
Simon Michael 2024-09-29 12:13:50 -10:00
parent d88e30ff43
commit a494e15d55
9 changed files with 1094 additions and 864 deletions

View File

@ -151,6 +151,10 @@ General help flags:
.PP .PP
With hledger\-ui, the \f[CR]\-\-debug\f[R] option sends debug output to With hledger\-ui, the \f[CR]\-\-debug\f[R] option sends debug output to
a \f[CR]hledger\-ui.log\f[R] file in the current directory. a \f[CR]hledger\-ui.log\f[R] file in the current directory.
.PP
If you use the bash shell, you can auto\-complete flags by pressing TAB
in the command line.
If this is not working see Install > Shell completions.
.SH MOUSE .SH MOUSE
In most modern terminals, you can navigate through the screens with a In most modern terminals, you can navigate through the screens with a
mouse or touchpad: mouse or touchpad:

View File

@ -162,6 +162,10 @@ General help flags:
With hledger-ui, the '--debug' option sends debug output to a With hledger-ui, the '--debug' option sends debug output to a
'hledger-ui.log' file in the current directory. 'hledger-ui.log' file in the current directory.
If you use the bash shell, you can auto-complete flags by pressing
TAB in the command line. If this is not working see Install > Shell
completions.
 
File: hledger-ui.info, Node: MOUSE, Next: KEYS, Prev: OPTIONS, Up: Top File: hledger-ui.info, Node: MOUSE, Next: KEYS, Prev: OPTIONS, Up: Top
@ -537,34 +541,34 @@ Tag Table:
Node: Top221 Node: Top221
Node: OPTIONS1872 Node: OPTIONS1872
Ref: #options1970 Ref: #options1970
Node: MOUSE8236 Node: MOUSE8389
Ref: #mouse8331 Ref: #mouse8484
Node: KEYS8568 Node: KEYS8721
Ref: #keys8661 Ref: #keys8814
Node: SCREENS13396 Node: SCREENS13549
Ref: #screens13500 Ref: #screens13653
Node: Menu screen14136 Node: Menu screen14289
Ref: #menu-screen14257 Ref: #menu-screen14410
Node: Cash accounts screen14452 Node: Cash accounts screen14605
Ref: #cash-accounts-screen14629 Ref: #cash-accounts-screen14782
Node: Balance sheet accounts screen14813 Node: Balance sheet accounts screen14966
Ref: #balance-sheet-accounts-screen15029 Ref: #balance-sheet-accounts-screen15182
Node: Income statement accounts screen15149 Node: Income statement accounts screen15302
Ref: #income-statement-accounts-screen15370 Ref: #income-statement-accounts-screen15523
Node: All accounts screen15534 Node: All accounts screen15687
Ref: #all-accounts-screen15715 Ref: #all-accounts-screen15868
Node: Register screen15897 Node: Register screen16050
Ref: #register-screen16056 Ref: #register-screen16209
Node: Transaction screen18340 Node: Transaction screen18493
Ref: #transaction-screen18498 Ref: #transaction-screen18651
Node: Error screen19915 Node: Error screen20068
Ref: #error-screen20037 Ref: #error-screen20190
Node: WATCH MODE20281 Node: WATCH MODE20434
Ref: #watch-mode20398 Ref: #watch-mode20551
Node: ENVIRONMENT21857 Node: ENVIRONMENT22010
Ref: #environment21973 Ref: #environment22126
Node: BUGS22164 Node: BUGS22317
Ref: #bugs22247 Ref: #bugs22400
 
End Tag Table End Tag Table

View File

@ -140,6 +140,10 @@ OPTIONS
With hledger-ui, the --debug option sends debug output to a With hledger-ui, the --debug option sends debug output to a
hledger-ui.log file in the current directory. hledger-ui.log file in the current directory.
If you use the bash shell, you can auto-complete flags by pressing TAB
in the command line. If this is not working see Install > Shell com-
pletions.
MOUSE MOUSE
In most modern terminals, you can navigate through the screens with a In most modern terminals, you can navigate through the screens with a
mouse or touchpad: mouse or touchpad:

View File

@ -211,6 +211,10 @@ balance, which looks like zero when costs are hidden.
Reporting options and/or query arguments can be used to set an initial Reporting options and/or query arguments can be used to set an initial
query, which although not shown in the UI, will restrict the data shown query, which although not shown in the UI, will restrict the data shown
(in addition to any search query entered in the UI). (in addition to any search query entered in the UI).
.PP
If you use the bash shell, you can auto\-complete flags by pressing TAB
in the command line.
If this is not working see Install > Shell completions.
.SH PERMISSIONS .SH PERMISSIONS
By default, hledger\-web allows anyone who can reach it to view the By default, hledger\-web allows anyone who can reach it to view the
journal and to add new transactions, but not to change existing data. journal and to add new transactions, but not to change existing data.

View File

@ -215,6 +215,10 @@ mixed-cost balance, which looks like zero when costs are hidden.
initial query, which although not shown in the UI, will restrict the initial query, which although not shown in the UI, will restrict the
data shown (in addition to any search query entered in the UI). data shown (in addition to any search query entered in the UI).
If you use the bash shell, you can auto-complete flags by pressing
TAB in the command line. If this is not working see Install > Shell
completions.
 
File: hledger-web.info, Node: PERMISSIONS, Next: EDITING UPLOADING DOWNLOADING, Prev: OPTIONS, Up: Top File: hledger-web.info, Node: PERMISSIONS, Next: EDITING UPLOADING DOWNLOADING, Prev: OPTIONS, Up: Top
@ -525,22 +529,22 @@ Tag Table:
Node: Top223 Node: Top223
Node: OPTIONS2569 Node: OPTIONS2569
Ref: #options2674 Ref: #options2674
Node: PERMISSIONS10948 Node: PERMISSIONS11101
Ref: #permissions11087 Ref: #permissions11240
Node: EDITING UPLOADING DOWNLOADING12299 Node: EDITING UPLOADING DOWNLOADING12452
Ref: #editing-uploading-downloading12480 Ref: #editing-uploading-downloading12633
Node: RELOADING13314 Node: RELOADING13467
Ref: #reloading13448 Ref: #reloading13601
Node: JSON API13881 Node: JSON API14034
Ref: #json-api13996 Ref: #json-api14149
Node: DEBUG OUTPUT19530 Node: DEBUG OUTPUT19683
Ref: #debug-output19655 Ref: #debug-output19808
Node: Debug output19682 Node: Debug output19835
Ref: #debug-output-119783 Ref: #debug-output-119936
Node: ENVIRONMENT20200 Node: ENVIRONMENT20353
Ref: #environment20319 Ref: #environment20472
Node: BUGS20436 Node: BUGS20589
Ref: #bugs20520 Ref: #bugs20673
 
End Tag Table End Tag Table

View File

@ -192,6 +192,10 @@ OPTIONS
query, which although not shown in the UI, will restrict the data shown query, which although not shown in the UI, will restrict the data shown
(in addition to any search query entered in the UI). (in addition to any search query entered in the UI).
If you use the bash shell, you can auto-complete flags by pressing TAB
in the command line. If this is not working see Install > Shell com-
pletions.
PERMISSIONS PERMISSIONS
By default, hledger-web allows anyone who can reach it to view the By default, hledger-web allows anyone who can reach it to view the
journal and to add new transactions, but not to change existing data. journal and to add new transactions, but not to change existing data.

View File

@ -290,8 +290,9 @@ Most of these commands do not change the journal file; they just read it
and output a report. and output a report.
A few commands assist with adding data and file management. A few commands assist with adding data and file management.
.PP .PP
To show the commands list, run \f[CR]hledger\f[R] with no arguments. To show a summary of commands, run \f[CR]hledger\f[R] with no arguments.
The commands are described in detail in PART 4: COMMANDS, below. You can see the same commands summary at the start of PART 4: COMMANDS
below.
.PP .PP
To use a particular command, run To use a particular command, run
\f[CR]hledger CMD [CMDOPTS] [CMDARGS]\f[R], \f[CR]hledger CMD [CMDOPTS] [CMDARGS]\f[R],
@ -748,8 +749,6 @@ Here\[aq]s a small example:
To use a config file, specify it with the \f[CR]\-\-conf\f[R] option. To use a config file, specify it with the \f[CR]\-\-conf\f[R] option.
Its options will be inserted near the start of your command line (so you Its options will be inserted near the start of your command line (so you
can override them if needed). can override them if needed).
Or, you can add a \f[CR]hledger \-\-conf\f[R] shebang line to a config
file and execute it like a script.
.PP .PP
Or, you can set up an automatic config file that is used whenever you Or, you can set up an automatic config file that is used whenever you
run hledger. run hledger.
@ -769,12 +768,14 @@ To inspect the processing of config files, use \f[CR]\-\-debug\f[R] or
Here is another example config file you could start with: Here is another example config file you could start with:
https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample
.PP .PP
Tips:
.PP
Automatic config files are convenient, but have a cost: it\[aq]s easy to Automatic config files are convenient, but have a cost: it\[aq]s easy to
change a report\[aq]s behaviour, or break scripts/applications which use change a report\[aq]s behaviour, or break scripts/applications which use
hledger, in unintended ways that will surprise you later. hledger, in unintended ways that will surprise you later.
They change the nature of hledger somewhat, making it less transparent They change the nature of hledger somewhat, making it less transparent
and predictable. and predictable.
If you decide to use one, here are some tips: If you decide to use one:
.IP \[bu] 2 .IP \[bu] 2
Be conservative about what you put in it. Be conservative about what you put in it.
Try to consider the effect on all your reports. Try to consider the effect on all your reports.
@ -785,8 +786,38 @@ Whenever a hledger command does not work as expected, try it again with
If that helps, you can run it with \f[CR]\-\-debug\f[R] to see how a If that helps, you can run it with \f[CR]\-\-debug\f[R] to see how a
config file affected it. config file affected it.
.PP .PP
This feature has been added in hledger 1.40 and is considered On unix machines, you can add a shebang line at the top of a config
file, set executable permission on the file, and use it like a script.
Eg (some operating systems need the \f[CR]\-S\f[R], some don\[aq]t):
.IP
.EX
#!/usr/bin/env \-S hledger \-\-conf
.EE
.PP
You can put not only options, but also arguments in a config file.
This is probably more useful in special\-purpose config files, not an
automatic one.
.PP
There\[aq]s an exception to this: a config file can\[aq]t provide the
command argument, currently (#2231).
If you need that, you can do it in the shebang line instead.
Eg:
.IP
.EX
#!/usr/bin/env \-S hledger balance \-\-conf
.EE
.PP
The config file feature has been added in hledger 1.40 and is considered
\f[I]experimental\f[R]. \f[I]experimental\f[R].
.SS Shell completions
If you use the bash shell, you can optionally set up context\-sensitive
autocompletions when you press TAB in a hledger command line.
At a bash shell prompt, try pressing \f[CR]hledger<SPACE><TAB><TAB>\f[R]
(should list all hledger commands) or
\f[CR]hledger reg acct:<TAB><TAB>\f[R] (should list your top\-level
account names).
If completions aren\[aq]t working, or for more details, see Install >
Shell completions.
.SH Output .SH Output
.SS Output destination .SS Output destination
hledger commands send their output to the terminal by default. hledger commands send their output to the terminal by default.
@ -4205,6 +4236,9 @@ in the code.
A comment starting with \f[CR]\[rs]n\f[R] will begin on a new line. A comment starting with \f[CR]\[rs]n\f[R] will begin on a new line.
.PP .PP
Comments can contain tags, as usual. Comments can contain tags, as usual.
.PP
Posting comments can also contain a posting date.
A secondary date, or a year\-less date, will be ignored.
.SS account field .SS account field
Assigning to \f[CR]accountN\f[R], where N is 1 to 99, sets the account Assigning to \f[CR]accountN\f[R], where N is 1 to 99, sets the account
name of the Nth posting, and causes that posting to be generated. name of the Nth posting, and causes that posting to be generated.
@ -5467,6 +5501,11 @@ And from the first date line onward, Emacs org mode heading prefixes at
the start of lines (one or more \f[CR]*\f[R]\[aq]s followed by a space) the start of lines (one or more \f[CR]*\f[R]\[aq]s followed by a space)
will be ignored. will be ignored.
This means the time log can also be a org outline. This means the time log can also be a org outline.
.PP
Timedot files don\[aq]t support directives like journal files.
So a common pattern is to have a main journal file (eg
\f[CR]time.journal\f[R]) that contains any needed directives, and then
includes the timedot file (\f[CR]include time.timedot\f[R]).
.SS Timedot examples .SS Timedot examples
Numbers: Numbers:
.IP .IP
@ -9089,6 +9128,7 @@ Flags:
balance value minus cost basis) balance value minus cost basis)
\-\-budget show sum of posting amounts compared to budget \-\-budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
\-\-count show the count of postings
\-\-change accumulate amounts from column start to column \-\-change accumulate amounts from column start to column
end (in multicolumn reports) end (in multicolumn reports)
\-\-cumulative accumulate amounts from report start (specified \-\-cumulative accumulate amounts from report start (specified
@ -9120,6 +9160,9 @@ Flags:
\[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]wide[,WIDTH]\[aq]: all commodities on one line
\[aq]tall\[aq] : each commodity on a new line \[aq]tall\[aq] : each commodity on a new line
\[aq]bare\[aq] : bare numbers, symbols in a column \[aq]bare\[aq] : bare numbers, symbols in a column
\-\-base\-url=URLPREFIX in html output, generate hyperlinks to
hledger\-web, with this prefix. (Usually the base
url shown by hledger\-web; can also be relative.)
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching
@ -9189,6 +9232,7 @@ Flags:
balance value minus cost basis) balance value minus cost basis)
\-\-budget show sum of posting amounts compared to budget \-\-budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
\-\-count show the count of postings
\-\-change accumulate amounts from column start to column \-\-change accumulate amounts from column start to column
end (in multicolumn reports) end (in multicolumn reports)
\-\-cumulative accumulate amounts from report start (specified \-\-cumulative accumulate amounts from report start (specified
@ -9220,6 +9264,9 @@ Flags:
\[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]wide[,WIDTH]\[aq]: all commodities on one line
\[aq]tall\[aq] : each commodity on a new line \[aq]tall\[aq] : each commodity on a new line
\[aq]bare\[aq] : bare numbers, symbols in a column \[aq]bare\[aq] : bare numbers, symbols in a column
\-\-base\-url=URLPREFIX in html output, generate hyperlinks to
hledger\-web, with this prefix. (Usually the base
url shown by hledger\-web; can also be relative.)
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching
@ -9297,6 +9344,7 @@ Flags:
balance value minus cost basis) balance value minus cost basis)
\-\-budget show sum of posting amounts compared to budget \-\-budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
\-\-count show the count of postings
\-\-change accumulate amounts from column start to column \-\-change accumulate amounts from column start to column
end (in multicolumn reports) (default) end (in multicolumn reports) (default)
\-\-cumulative accumulate amounts from report start (specified \-\-cumulative accumulate amounts from report start (specified
@ -9327,6 +9375,9 @@ Flags:
\[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]wide[,WIDTH]\[aq]: all commodities on one line
\[aq]tall\[aq] : each commodity on a new line \[aq]tall\[aq] : each commodity on a new line
\[aq]bare\[aq] : bare numbers, symbols in a column \[aq]bare\[aq] : bare numbers, symbols in a column
\-\-base\-url=URLPREFIX in html output, generate hyperlinks to
hledger\-web, with this prefix. (Usually the base
url shown by hledger\-web; can also be relative.)
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching
@ -9394,6 +9445,7 @@ Flags:
balance value minus cost basis) balance value minus cost basis)
\-\-budget show sum of posting amounts compared to budget \-\-budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
\-\-count show the count of postings
\-\-change accumulate amounts from column start to column \-\-change accumulate amounts from column start to column
end (in multicolumn reports) (default) end (in multicolumn reports) (default)
\-\-cumulative accumulate amounts from report start (specified \-\-cumulative accumulate amounts from report start (specified
@ -9424,6 +9476,9 @@ Flags:
\[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]wide[,WIDTH]\[aq]: all commodities on one line
\[aq]tall\[aq] : each commodity on a new line \[aq]tall\[aq] : each commodity on a new line
\[aq]bare\[aq] : bare numbers, symbols in a column \[aq]bare\[aq] : bare numbers, symbols in a column
\-\-base\-url=URLPREFIX in html output, generate hyperlinks to
hledger\-web, with this prefix. (Usually the base
url shown by hledger\-web; can also be relative.)
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching
@ -9488,6 +9543,11 @@ performance, unrealised capital gains, etc.
.EX .EX
Flags: Flags:
\-\-sum show sum of posting amounts (default) \-\-sum show sum of posting amounts (default)
\-\-valuechange show total change of value of period\-end
historical balances (caused by deposits,
withdrawals, market price fluctuations)
\-\-gain show unrealised capital gain/loss (historical
balance value minus cost basis)
\-\-budget[=DESCPAT] show sum of posting amounts together with budget \-\-budget[=DESCPAT] show sum of posting amounts together with budget
goals defined by periodic goals defined by periodic
transactions. With a DESCPAT argument (must be transactions. With a DESCPAT argument (must be
@ -9495,11 +9555,6 @@ Flags:
use only periodic transactions with matching use only periodic transactions with matching
description description
(case insensitive substring match). (case insensitive substring match).
\-\-valuechange show total change of value of period\-end
historical balances (caused by deposits,
withdrawals, market price fluctuations)
\-\-gain show unrealised capital gain/loss (historical
balance value minus cost basis)
\-\-count show the count of postings \-\-count show the count of postings
\-\-change accumulate amounts from column start to column \-\-change accumulate amounts from column start to column
end (in multicolumn reports, default) end (in multicolumn reports, default)
@ -9517,7 +9572,6 @@ Flags:
with \-E) with \-E)
\-A \-\-average show a row average column (in multicolumn \-A \-\-average show a row average column (in multicolumn
reports) reports)
\-r \-\-related show postings\[aq] siblings instead
\-T \-\-row\-total show a row total column (in multicolumn reports) \-T \-\-row\-total show a row total column (in multicolumn reports)
\-\-summary\-only display only row summaries (e.g. row total, \-\-summary\-only display only row summaries (e.g. row total,
average) (in multicolumn reports) average) (in multicolumn reports)
@ -9530,14 +9584,18 @@ Flags:
total, or by row average if that is displayed. total, or by row average if that is displayed.
\-% \-\-percent express values in percentage of each column\[aq]s \-% \-\-percent express values in percentage of each column\[aq]s
total total
\-r \-\-related show the other accounts transacted with, instead
\-\-invert display all amounts with reversed sign \-\-invert display all amounts with reversed sign
\-\-transpose transpose rows and columns \-\-transpose switch rows and columns (use vertical time axis)
\-\-layout=ARG how to lay out multi\-commodity amounts and the \-\-layout=ARG how to lay out multi\-commodity amounts and the
overall table: overall table:
\[aq]wide[,WIDTH]\[aq]: commodities on one line \[aq]wide[,WIDTH]\[aq]: commodities on one line
\[aq]tall\[aq] : commodities on separate lines \[aq]tall\[aq] : commodities on separate lines
\[aq]bare\[aq] : commodity symbols in one column \[aq]bare\[aq] : commodity symbols in one column
\[aq]tidy\[aq] : every attribute in its own column \[aq]tidy\[aq] : every attribute in its own column
\-\-base\-url=URLPREFIX in html output, generate links to hledger\-web,
with this prefix. (Usually the base url shown by
hledger\-web; can also be relative.)
\-O \-\-output\-format=FMT select the output format. Supported formats: \-O \-\-output\-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json, fods. txt, html, csv, tsv, json, fods.
\-o \-\-output\-file=FILE write output to FILE. A file extension matching \-o \-\-output\-file=FILE write output to FILE. A file extension matching
@ -9890,6 +9948,17 @@ each commodity:
$ hledger bal \-% cur:\[rs]\[rs]$ $ hledger bal \-% cur:\[rs]\[rs]$
$ hledger bal \-% cur:€ $ hledger bal \-% cur:€
.EE .EE
.SS Hyperlinks
The HTML and FODS output formats can generate hyperlinks to a
\f[CR]hledger\-web\f[R] register view for each account and period.
E.g.
if your \f[CR]hledger\-web\f[R] server is reachable at
\f[CR]http://localhost:5000\f[R] then you might run the
\f[CR]balance\f[R] command with the extra option
\f[CR]\-\-base\-url=http://localhost:5000\f[R].
You can also produce relative links, like
\f[CR]\-\-base\-url=\[dq]some/path\[dq]\f[R] or
\f[CR]\-\-base\-url=\[dq]\[dq]\f[R].)
.SS Multi\-period balance report .SS Multi\-period balance report
With a report interval (set by the \f[CR]\-D/\-\-daily\f[R], With a report interval (set by the \f[CR]\-D/\-\-daily\f[R],
\f[CR]\-W/\-\-weekly\f[R], \f[CR]\-M/\-\-monthly\f[R], \f[CR]\-W/\-\-weekly\f[R], \f[CR]\-M/\-\-monthly\f[R],

File diff suppressed because it is too large Load Diff

View File

@ -203,8 +203,8 @@ Commands
output a report. A few commands assist with adding data and file man- output a report. A few commands assist with adding data and file man-
agement. agement.
To show the commands list, run hledger with no arguments. The commands To show a summary of commands, run hledger with no arguments. You can
are described in detail in PART 4: COMMANDS, below. see the same commands summary at the start of PART 4: COMMANDS below.
To use a particular command, run hledger CMD [CMDOPTS] [CMDARGS], To use a particular command, run hledger CMD [CMDOPTS] [CMDARGS],
@ -582,8 +582,7 @@ Options
To use a config file, specify it with the --conf option. Its options To use a config file, specify it with the --conf option. Its options
will be inserted near the start of your command line (so you can over- will be inserted near the start of your command line (so you can over-
ride them if needed). Or, you can add a hledger --conf shebang line to ride them if needed).
a config file and execute it like a script.
Or, you can set up an automatic config file that is used whenever you Or, you can set up an automatic config file that is used whenever you
run hledger. This can be hledger.conf in the current directory or run hledger. This can be hledger.conf in the current directory or
@ -599,11 +598,13 @@ Options
Here is another example config file you could start with: Here is another example config file you could start with:
https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample
Tips:
Automatic config files are convenient, but have a cost: it's easy to Automatic config files are convenient, but have a cost: it's easy to
change a report's behaviour, or break scripts/applications which use change a report's behaviour, or break scripts/applications which use
hledger, in unintended ways that will surprise you later. They change hledger, in unintended ways that will surprise you later. They change
the nature of hledger somewhat, making it less transparent and pre- the nature of hledger somewhat, making it less transparent and pre-
dictable. If you decide to use one, here are some tips: dictable. If you decide to use one:
o Be conservative about what you put in it. Try to consider the effect o Be conservative about what you put in it. Try to consider the effect
on all your reports. on all your reports.
@ -614,8 +615,32 @@ Options
o If that helps, you can run it with --debug to see how a config file o If that helps, you can run it with --debug to see how a config file
affected it. affected it.
This feature has been added in hledger 1.40 and is considered experi- On unix machines, you can add a shebang line at the top of a config
mental. file, set executable permission on the file, and use it like a script.
Eg (some operating systems need the -S, some don't):
#!/usr/bin/env -S hledger --conf
You can put not only options, but also arguments in a config file.
This is probably more useful in special-purpose config files, not an
automatic one.
There's an exception to this: a config file can't provide the command
argument, currently (#2231). If you need that, you can do it in the
shebang line instead. Eg:
#!/usr/bin/env -S hledger balance --conf
The config file feature has been added in hledger 1.40 and is consid-
ered experimental.
Shell completions
If you use the bash shell, you can optionally set up context-sensitive
autocompletions when you press TAB in a hledger command line. At a
bash shell prompt, try pressing hledger<SPACE><TAB><TAB> (should list
all hledger commands) or hledger reg acct:<TAB><TAB> (should list your
top-level account names). If completions aren't working, or for more
details, see Install > Shell completions.
Output Output
Output destination Output destination
@ -3276,6 +3301,9 @@ CSV
Comments can contain tags, as usual. Comments can contain tags, as usual.
Posting comments can also contain a posting date. A secondary date, or
a year-less date, will be ignored.
account field account field
Assigning to accountN, where N is 1 to 99, sets the account name of the Assigning to accountN, where N is 1 to 99, sets the account name of the
Nth posting, and causes that posting to be generated. Nth posting, and causes that posting to be generated.
@ -4329,6 +4357,11 @@ Timedot
space) will be ignored. This means the time log can also be a org space) will be ignored. This means the time log can also be a org
outline. outline.
Timedot files don't support directives like journal files. So a common
pattern is to have a main journal file (eg time.journal) that contains
any needed directives, and then includes the timedot file (include
time.timedot).
Timedot examples Timedot examples
Numbers: Numbers:
@ -7147,6 +7180,7 @@ Standard report commands
balance value minus cost basis) balance value minus cost basis)
--budget show sum of posting amounts compared to budget --budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
--count show the count of postings
--change accumulate amounts from column start to column --change accumulate amounts from column start to column
end (in multicolumn reports) end (in multicolumn reports)
--cumulative accumulate amounts from report start (specified --cumulative accumulate amounts from report start (specified
@ -7178,6 +7212,9 @@ Standard report commands
'wide[,WIDTH]': all commodities on one line 'wide[,WIDTH]': all commodities on one line
'tall' : each commodity on a new line 'tall' : each commodity on a new line
'bare' : bare numbers, symbols in a column 'bare' : bare numbers, symbols in a column
--base-url=URLPREFIX in html output, generate hyperlinks to
hledger-web, with this prefix. (Usually the base
url shown by hledger-web; can also be relative.)
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -7240,6 +7277,7 @@ Standard report commands
balance value minus cost basis) balance value minus cost basis)
--budget show sum of posting amounts compared to budget --budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
--count show the count of postings
--change accumulate amounts from column start to column --change accumulate amounts from column start to column
end (in multicolumn reports) end (in multicolumn reports)
--cumulative accumulate amounts from report start (specified --cumulative accumulate amounts from report start (specified
@ -7271,6 +7309,9 @@ Standard report commands
'wide[,WIDTH]': all commodities on one line 'wide[,WIDTH]': all commodities on one line
'tall' : each commodity on a new line 'tall' : each commodity on a new line
'bare' : bare numbers, symbols in a column 'bare' : bare numbers, symbols in a column
--base-url=URLPREFIX in html output, generate hyperlinks to
hledger-web, with this prefix. (Usually the base
url shown by hledger-web; can also be relative.)
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -7339,6 +7380,7 @@ Standard report commands
balance value minus cost basis) balance value minus cost basis)
--budget show sum of posting amounts compared to budget --budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
--count show the count of postings
--change accumulate amounts from column start to column --change accumulate amounts from column start to column
end (in multicolumn reports) (default) end (in multicolumn reports) (default)
--cumulative accumulate amounts from report start (specified --cumulative accumulate amounts from report start (specified
@ -7369,6 +7411,9 @@ Standard report commands
'wide[,WIDTH]': all commodities on one line 'wide[,WIDTH]': all commodities on one line
'tall' : each commodity on a new line 'tall' : each commodity on a new line
'bare' : bare numbers, symbols in a column 'bare' : bare numbers, symbols in a column
--base-url=URLPREFIX in html output, generate hyperlinks to
hledger-web, with this prefix. (Usually the base
url shown by hledger-web; can also be relative.)
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -7428,6 +7473,7 @@ Standard report commands
balance value minus cost basis) balance value minus cost basis)
--budget show sum of posting amounts compared to budget --budget show sum of posting amounts compared to budget
goals defined by periodic transactions goals defined by periodic transactions
--count show the count of postings
--change accumulate amounts from column start to column --change accumulate amounts from column start to column
end (in multicolumn reports) (default) end (in multicolumn reports) (default)
--cumulative accumulate amounts from report start (specified --cumulative accumulate amounts from report start (specified
@ -7458,6 +7504,9 @@ Standard report commands
'wide[,WIDTH]': all commodities on one line 'wide[,WIDTH]': all commodities on one line
'tall' : each commodity on a new line 'tall' : each commodity on a new line
'bare' : bare numbers, symbols in a column 'bare' : bare numbers, symbols in a column
--base-url=URLPREFIX in html output, generate hyperlinks to
hledger-web, with this prefix. (Usually the base
url shown by hledger-web; can also be relative.)
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json. txt, html, csv, tsv, json.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -7514,6 +7563,11 @@ Advanced report commands
Flags: Flags:
--sum show sum of posting amounts (default) --sum show sum of posting amounts (default)
--valuechange show total change of value of period-end
historical balances (caused by deposits,
withdrawals, market price fluctuations)
--gain show unrealised capital gain/loss (historical
balance value minus cost basis)
--budget[=DESCPAT] show sum of posting amounts together with budget --budget[=DESCPAT] show sum of posting amounts together with budget
goals defined by periodic goals defined by periodic
transactions. With a DESCPAT argument (must be transactions. With a DESCPAT argument (must be
@ -7521,11 +7575,6 @@ Advanced report commands
use only periodic transactions with matching use only periodic transactions with matching
description description
(case insensitive substring match). (case insensitive substring match).
--valuechange show total change of value of period-end
historical balances (caused by deposits,
withdrawals, market price fluctuations)
--gain show unrealised capital gain/loss (historical
balance value minus cost basis)
--count show the count of postings --count show the count of postings
--change accumulate amounts from column start to column --change accumulate amounts from column start to column
end (in multicolumn reports, default) end (in multicolumn reports, default)
@ -7543,7 +7592,6 @@ Advanced report commands
with -E) with -E)
-A --average show a row average column (in multicolumn -A --average show a row average column (in multicolumn
reports) reports)
-r --related show postings' siblings instead
-T --row-total show a row total column (in multicolumn reports) -T --row-total show a row total column (in multicolumn reports)
--summary-only display only row summaries (e.g. row total, --summary-only display only row summaries (e.g. row total,
average) (in multicolumn reports) average) (in multicolumn reports)
@ -7556,14 +7604,18 @@ Advanced report commands
total, or by row average if that is displayed. total, or by row average if that is displayed.
-% --percent express values in percentage of each column's -% --percent express values in percentage of each column's
total total
-r --related show the other accounts transacted with, instead
--invert display all amounts with reversed sign --invert display all amounts with reversed sign
--transpose transpose rows and columns --transpose switch rows and columns (use vertical time axis)
--layout=ARG how to lay out multi-commodity amounts and the --layout=ARG how to lay out multi-commodity amounts and the
overall table: overall table:
'wide[,WIDTH]': commodities on one line 'wide[,WIDTH]': commodities on one line
'tall' : commodities on separate lines 'tall' : commodities on separate lines
'bare' : commodity symbols in one column 'bare' : commodity symbols in one column
'tidy' : every attribute in its own column 'tidy' : every attribute in its own column
--base-url=URLPREFIX in html output, generate links to hledger-web,
with this prefix. (Usually the base url shown by
hledger-web; can also be relative.)
-O --output-format=FMT select the output format. Supported formats: -O --output-format=FMT select the output format. Supported formats:
txt, html, csv, tsv, json, fods. txt, html, csv, tsv, json, fods.
-o --output-file=FILE write output to FILE. A file extension matching -o --output-file=FILE write output to FILE. A file extension matching
@ -7879,6 +7931,14 @@ Advanced report commands
$ hledger bal -% cur:\\$ $ hledger bal -% cur:\\$
$ hledger bal -% cur: $ hledger bal -% cur:
Hyperlinks
The HTML and FODS output formats can generate hyperlinks to a
hledger-web register view for each account and period. E.g. if your
hledger-web server is reachable at http://localhost:5000 then you might
run the balance command with the extra option --base-url=http://local-
host:5000. You can also produce relative links, like
--base-url="some/path" or --base-url="".)
Multi-period balance report Multi-period balance report
With a report interval (set by the -D/--daily, -W/--weekly, With a report interval (set by the -D/--daily, -W/--weekly,
-M/--monthly, -Q/--quarterly, -Y/--yearly, or -p/--period flag), bal- -M/--monthly, -Q/--quarterly, -Y/--yearly, or -p/--period flag), bal-