;doc: regen manuals

[ci skip]
This commit is contained in:
Simon Michael 2020-02-07 12:14:08 -08:00
parent fe96d089a1
commit 202d2e945b
3 changed files with 937 additions and 919 deletions

View File

@ -74,7 +74,7 @@ Here are some quick examples of how to do some basic tasks with hledger.
For more details, see the reference section below, the For more details, see the reference section below, the
hledger_journal(5) manual, or the more extensive docs at hledger_journal(5) manual, or the more extensive docs at
https://hledger.org. https://hledger.org.
.SS Get help .SS Getting help
.IP .IP
.nf .nf
\f[C] \f[C]
@ -90,6 +90,26 @@ $ hledger help --help # show more detailed help for the help command
.PP .PP
Find more docs, chat, mail list, reddit, issue tracker: Find more docs, chat, mail list, reddit, issue tracker:
https://hledger.org#help-feedback https://hledger.org#help-feedback
.SS Constructing a command line
.PP
hledger has an extensive and powerful command line interface.
We strive to keep it simple and ergonomic, but you may run into one of
the confusing real world details described in OPTIONS, below.
If that happens, here are some tips that may help:
.IP \[bu] 2
command-specific options must go after the command (it\[aq]s fine to put
all options there) (\f[C]hledger CMD OPTS ARGS\f[R])
.IP \[bu] 2
running add-on executables directly simplifies command line parsing
(\f[C]hledger-ui OPTS ARGS\f[R])
.IP \[bu] 2
enclose \[dq]problematic\[dq] args in single quotes
.IP \[bu] 2
if needed, also add a backslash to hide regular expression
metacharacters from the shell
.IP \[bu] 2
to see how a misbehaving command is being parsed, add
\f[C]--debug=2\f[R].
.SS Starting a Journal .SS Starting a Journal
.PP .PP
hledger looks for your accounting data in a journal file, hledger looks for your accounting data in a journal file,
@ -873,20 +893,6 @@ And backslashes may work better than quotes.
Eg: Eg:
.PP .PP
\f[C]ghci> :main balance cur:\[rs]$\f[R] \f[C]ghci> :main balance cur:\[rs]$\f[R]
.SS Command line tips
.PP
If in doubt, keep things simple:
.IP \[bu] 2
write options after the command (\f[C]hledger CMD -OPTIONS ARGS\f[R])
.IP \[bu] 2
run add-on executables directly (\f[C]hledger-ui -OPTIONS ARGS\f[R])
.IP \[bu] 2
enclose problematic args in single quotes
.IP \[bu] 2
if needed, also add a backslash to escape regexp metacharacters
.PP
To find out exactly how a command line is being parsed, add
\f[C]--debug=2\f[R] to troubleshoot.
.SS Unicode characters .SS Unicode characters
.PP .PP
hledger is expected to handle non-ascii characters correctly: hledger is expected to handle non-ascii characters correctly:
@ -1025,6 +1031,77 @@ balance assertions will not see any account balances from previous files
.PP .PP
If you need those, either use the include directive, or concatenate the If you need those, either use the include directive, or concatenate the
files, eg: \f[C]cat a.journal b.journal | hledger -f- CMD\f[R]. files, eg: \f[C]cat a.journal b.journal | hledger -f- CMD\f[R].
.SS Output destination
.PP
Some commands (print, register, stats, the balance commands) can write
their output to a destination other than the console.
This is controlled by the \f[C]-o/--output-file\f[R] option.
.IP
.nf
\f[C]
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE
\f[R]
.fi
.SS Output format
.PP
Some commands can write their output in other formats.
Eg print and register can output CSV, and the balance commands can
output CSV or HTML.
This is controlled by the \f[C]-O/--output-format\f[R] option, or by
specifying a \f[C].csv\f[R] or \f[C].html\f[R] file extension with
\f[C]-o/--output-file\f[R].
.IP
.nf
\f[C]
$ hledger balance -O csv # write CSV to stdout
$ hledger balance -o FILE.csv # write CSV to FILE.csv
\f[R]
.fi
.SS Regular expressions
.PP
hledger uses regular expressions in a number of places:
.IP \[bu] 2
query terms, on the command line and in the hledger-web search form:
\f[C]REGEX\f[R], \f[C]desc:REGEX\f[R], \f[C]cur:REGEX\f[R],
\f[C]tag:...=REGEX\f[R]
.IP \[bu] 2
CSV rules conditional blocks: \f[C]if REGEX ...\f[R]
.IP \[bu] 2
account alias directives and options:
\f[C]alias /REGEX/ = REPLACEMENT\f[R],
\f[C]--alias /REGEX/=REPLACEMENT\f[R]
.PP
hledger\[aq]s regular expressions come from the regex-tdfa library.
In general they:
.IP \[bu] 2
are case insensitive
.IP \[bu] 2
are infix matching (do not need to match the entire thing being matched)
.IP \[bu] 2
are POSIX extended regular expressions
.IP \[bu] 2
also support GNU word boundaries (\[rs]<, \[rs]>, \[rs]b, \[rs]B)
.IP \[bu] 2
and parenthesised capturing groups and numeric backreferences in
replacement strings
.IP \[bu] 2
do not support mode modifiers like (?s)
.PP
Some things to note:
.IP \[bu] 2
In the \f[C]alias\f[R] directive and \f[C]--alias\f[R] option, regular
expressions must be enclosed in forward slashes (\f[C]/REGEX/\f[R]).
Elsewhere in hledger, these are not required.
.IP \[bu] 2
In queries, to match a regular expression metacharacter like \f[C]$\f[R]
as a literal character, prepend a backslash.
Eg to search for amounts with the dollar sign in hledger-web, write
\f[C]cur:\[rs]$\f[R].
.IP \[bu] 2
On the command line, some metacharacters like \f[C]$\f[R] have a special
meaning to the shell and so must be escaped at least once more.
See Special characters.
.SS Smart dates .SS Smart dates
.PP .PP
hledger\[aq]s user interfaces accept a flexible \[dq]smart date\[dq] hledger\[aq]s user interfaces accept a flexible \[dq]smart date\[dq]
@ -2047,77 +2124,6 @@ report\[aq]s multi-period mode (whether showing one or many subperiods).
.SS Combining -B, -V, -X, --value .SS Combining -B, -V, -X, --value
.PP .PP
The rightmost of these flags wins. The rightmost of these flags wins.
.SS Output destination
.PP
Some commands (print, register, stats, the balance commands) can write
their output to a destination other than the console.
This is controlled by the \f[C]-o/--output-file\f[R] option.
.IP
.nf
\f[C]
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE
\f[R]
.fi
.SS Output format
.PP
Some commands can write their output in other formats.
Eg print and register can output CSV, and the balance commands can
output CSV or HTML.
This is controlled by the \f[C]-O/--output-format\f[R] option, or by
specifying a \f[C].csv\f[R] or \f[C].html\f[R] file extension with
\f[C]-o/--output-file\f[R].
.IP
.nf
\f[C]
$ hledger balance -O csv # write CSV to stdout
$ hledger balance -o FILE.csv # write CSV to FILE.csv
\f[R]
.fi
.SS Regular expressions
.PP
hledger uses regular expressions in a number of places:
.IP \[bu] 2
query terms, on the command line and in the hledger-web search form:
\f[C]REGEX\f[R], \f[C]desc:REGEX\f[R], \f[C]cur:REGEX\f[R],
\f[C]tag:...=REGEX\f[R]
.IP \[bu] 2
CSV rules conditional blocks: \f[C]if REGEX ...\f[R]
.IP \[bu] 2
account alias directives and options:
\f[C]alias /REGEX/ = REPLACEMENT\f[R],
\f[C]--alias /REGEX/=REPLACEMENT\f[R]
.PP
hledger\[aq]s regular expressions come from the regex-tdfa library.
In general they:
.IP \[bu] 2
are case insensitive
.IP \[bu] 2
are infix matching (do not need to match the entire thing being matched)
.IP \[bu] 2
are POSIX extended regular expressions
.IP \[bu] 2
also support GNU word boundaries (\[rs]<, \[rs]>, \[rs]b, \[rs]B)
.IP \[bu] 2
and parenthesised capturing groups and numeric backreferences in
replacement strings
.IP \[bu] 2
do not support mode modifiers like (?s)
.PP
Some things to note:
.IP \[bu] 2
In the \f[C]alias\f[R] directive and \f[C]--alias\f[R] option, regular
expressions must be enclosed in forward slashes (\f[C]/REGEX/\f[R]).
Elsewhere in hledger, these are not required.
.IP \[bu] 2
In queries, to match a regular expression metacharacter like \f[C]$\f[R]
as a literal character, prepend a backslash.
Eg to search for amounts with the dollar sign in hledger-web, write
\f[C]cur:\[rs]$\f[R].
.IP \[bu] 2
On the command line, some metacharacters like \f[C]$\f[R] have a special
meaning to the shell and so must be escaped at least once more.
See Special characters.
.SH COMMANDS .SH COMMANDS
.PP .PP
hledger provides a number of subcommands; \f[C]hledger\f[R] with no hledger provides a number of subcommands; \f[C]hledger\f[R] with no

View File

@ -75,7 +75,8 @@ https://hledger.org.
* Menu: * Menu:
* Get help:: * Getting help::
* Constructing a command line::
* Starting a Journal:: * Starting a Journal::
* Setting Opening Balances:: * Setting Opening Balances::
* Recording Transactions:: * Recording Transactions::
@ -84,10 +85,10 @@ https://hledger.org.
* Starting a New File:: * Starting a New File::
 
File: hledger.info, Node: Get help, Next: Starting a Journal, Up: COMMON TASKS File: hledger.info, Node: Getting help, Next: Constructing a command line, Up: COMMON TASKS
1.1 Get help 1.1 Getting help
============ ================
$ hledger # show available commands $ hledger # show available commands
$ hledger --help # show common options $ hledger --help # show common options
@ -101,9 +102,29 @@ $ hledger help --help # show more detailed help for the help command
https://hledger.org#help-feedback https://hledger.org#help-feedback
 
File: hledger.info, Node: Starting a Journal, Next: Setting Opening Balances, Prev: Get help, Up: COMMON TASKS File: hledger.info, Node: Constructing a command line, Next: Starting a Journal, Prev: Getting help, Up: COMMON TASKS
1.2 Starting a Journal 1.2 Constructing a command line
===============================
hledger has an extensive and powerful command line interface. We strive
to keep it simple and ergonomic, but you may run into one of the
confusing real world details described in OPTIONS, below. If that
happens, here are some tips that may help:
* command-specific options must go after the command (it's fine to
put all options there) ('hledger CMD OPTS ARGS')
* running add-on executables directly simplifies command line parsing
('hledger-ui OPTS ARGS')
* enclose "problematic" args in single quotes
* if needed, also add a backslash to hide regular expression
metacharacters from the shell
* to see how a misbehaving command is being parsed, add '--debug=2'.

File: hledger.info, Node: Starting a Journal, Next: Setting Opening Balances, Prev: Constructing a command line, Up: COMMON TASKS
1.3 Starting a Journal
====================== ======================
hledger looks for your accounting data in a journal file, hledger looks for your accounting data in a journal file,
@ -142,7 +163,7 @@ Market prices : 0 ()
 
File: hledger.info, Node: Setting Opening Balances, Next: Recording Transactions, Prev: Starting a Journal, Up: COMMON TASKS File: hledger.info, Node: Setting Opening Balances, Next: Recording Transactions, Prev: Starting a Journal, Up: COMMON TASKS
1.3 Setting Opening Balances 1.4 Setting Opening Balances
============================ ============================
Pick a starting date for which you can look up the balances of some Pick a starting date for which you can look up the balances of some
@ -225,7 +246,7 @@ $ git commit -am 'initial balances' 2020.journal
 
File: hledger.info, Node: Recording Transactions, Next: Reconciling, Prev: Setting Opening Balances, Up: COMMON TASKS File: hledger.info, Node: Recording Transactions, Next: Reconciling, Prev: Setting Opening Balances, Up: COMMON TASKS
1.4 Recording Transactions 1.5 Recording Transactions
========================== ==========================
As you spend or receive money, you can record these transactions using As you spend or receive money, you can record these transactions using
@ -251,7 +272,7 @@ and hledger.org for more ideas:
 
File: hledger.info, Node: Reconciling, Next: Reporting, Prev: Recording Transactions, Up: COMMON TASKS File: hledger.info, Node: Reconciling, Next: Reporting, Prev: Recording Transactions, Up: COMMON TASKS
1.5 Reconciling 1.6 Reconciling
=============== ===============
Periodically you should reconcile - compare your hledger-reported Periodically you should reconcile - compare your hledger-reported
@ -306,7 +327,7 @@ $ git commit -am 'txns' 2020.journal
 
File: hledger.info, Node: Reporting, Next: Starting a New File, Prev: Reconciling, Up: COMMON TASKS File: hledger.info, Node: Reporting, Next: Starting a New File, Prev: Reconciling, Up: COMMON TASKS
1.6 Reporting 1.7 Reporting
============= =============
Here are some basic reports. Here are some basic reports.
@ -454,7 +475,7 @@ $ hledger activity -W
 
File: hledger.info, Node: Starting a New File, Prev: Reporting, Up: COMMON TASKS File: hledger.info, Node: Starting a New File, Prev: Reporting, Up: COMMON TASKS
1.7 Starting a New File 1.8 Starting a New File
======================= =======================
At the end of the year, you may want to continue your journal in a new At the end of the year, you may want to continue your journal in a new
@ -475,9 +496,11 @@ File: hledger.info, Node: OPTIONS, Next: COMMANDS, Prev: COMMON TASKS, Up: T
* Command arguments:: * Command arguments::
* Queries:: * Queries::
* Special characters in arguments and queries:: * Special characters in arguments and queries::
* Command line tips::
* Unicode characters:: * Unicode characters::
* Input files:: * Input files::
* Output destination::
* Output format::
* Regular expressions::
* Smart dates:: * Smart dates::
* Report start & end date:: * Report start & end date::
* Report intervals:: * Report intervals::
@ -485,9 +508,6 @@ File: hledger.info, Node: OPTIONS, Next: COMMANDS, Prev: COMMON TASKS, Up: T
* Depth limiting:: * Depth limiting::
* Pivoting:: * Pivoting::
* Valuation:: * Valuation::
* Output destination::
* Output format::
* Regular expressions::
 
File: hledger.info, Node: General options, Next: Command options, Up: OPTIONS File: hledger.info, Node: General options, Next: Command options, Up: OPTIONS
@ -773,7 +793,7 @@ and query arguments, and the resulting query will be their intersection
(perhaps excluding the '-p/--period' option). (perhaps excluding the '-p/--period' option).
 
File: hledger.info, Node: Special characters in arguments and queries, Next: Command line tips, Prev: Queries, Up: OPTIONS File: hledger.info, Node: Special characters in arguments and queries, Next: Unicode characters, Prev: Queries, Up: OPTIONS
2.5 Special characters in arguments and queries 2.5 Special characters in arguments and queries
=============================================== ===============================================
@ -856,25 +876,9 @@ Eg:
'ghci> :main balance cur:\$' 'ghci> :main balance cur:\$'
 
File: hledger.info, Node: Command line tips, Next: Unicode characters, Prev: Special characters in arguments and queries, Up: OPTIONS File: hledger.info, Node: Unicode characters, Next: Input files, Prev: Special characters in arguments and queries, Up: OPTIONS
2.6 Command line tips 2.6 Unicode characters
=====================
If in doubt, keep things simple:
* write options after the command ('hledger CMD -OPTIONS ARGS')
* run add-on executables directly ('hledger-ui -OPTIONS ARGS')
* enclose problematic args in single quotes
* if needed, also add a backslash to escape regexp metacharacters
To find out exactly how a command line is being parsed, add
'--debug=2' to troubleshoot.

File: hledger.info, Node: Unicode characters, Next: Input files, Prev: Command line tips, Up: OPTIONS
2.7 Unicode characters
====================== ======================
hledger is expected to handle non-ascii characters correctly: hledger is expected to handle non-ascii characters correctly:
@ -911,9 +915,9 @@ hledger is expected to handle non-ascii characters correctly:
terminal, and vice versa. (See eg #961). terminal, and vice versa. (See eg #961).
 
File: hledger.info, Node: Input files, Next: Smart dates, Prev: Unicode characters, Up: OPTIONS File: hledger.info, Node: Input files, Next: Output destination, Prev: Unicode characters, Up: OPTIONS
2.8 Input files 2.7 Input files
=============== ===============
hledger reads transactions from a data file (and the add command writes hledger reads transactions from a data file (and the add command writes
@ -966,10 +970,77 @@ one big journal. There are some limitations with this:
the files, eg: 'cat a.journal b.journal | hledger -f- CMD'. the files, eg: 'cat a.journal b.journal | hledger -f- CMD'.
 
File: hledger.info, Node: Smart dates, Next: Report start & end date, Prev: Input files, Up: OPTIONS File: hledger.info, Node: Output destination, Next: Output format, Prev: Input files, Up: OPTIONS
2.9 Smart dates 2.8 Output destination
=============== ======================
Some commands (print, register, stats, the balance commands) can write
their output to a destination other than the console. This is
controlled by the '-o/--output-file' option.
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE

File: hledger.info, Node: Output format, Next: Regular expressions, Prev: Output destination, Up: OPTIONS
2.9 Output format
=================
Some commands can write their output in other formats. Eg print and
register can output CSV, and the balance commands can output CSV or
HTML. This is controlled by the '-O/--output-format' option, or by
specifying a '.csv' or '.html' file extension with '-o/--output-file'.
$ hledger balance -O csv # write CSV to stdout
$ hledger balance -o FILE.csv # write CSV to FILE.csv

File: hledger.info, Node: Regular expressions, Next: Smart dates, Prev: Output format, Up: OPTIONS
2.10 Regular expressions
========================
hledger uses regular expressions in a number of places:
* query terms, on the command line and in the hledger-web search
form: 'REGEX', 'desc:REGEX', 'cur:REGEX', 'tag:...=REGEX'
* CSV rules conditional blocks: 'if REGEX ...'
* account alias directives and options: 'alias /REGEX/ =
REPLACEMENT', '--alias /REGEX/=REPLACEMENT'
hledger's regular expressions come from the regex-tdfa library. In
general they:
* are case insensitive
* are infix matching (do not need to match the entire thing being
matched)
* are POSIX extended regular expressions
* also support GNU word boundaries (\<, \>, \b, \B)
* and parenthesised capturing groups and numeric backreferences in
replacement strings
* do not support mode modifiers like (?s)
Some things to note:
* In the 'alias' directive and '--alias' option, regular expressions
must be enclosed in forward slashes ('/REGEX/'). Elsewhere in
hledger, these are not required.
* In queries, to match a regular expression metacharacter like '$' as
a literal character, prepend a backslash. Eg to search for amounts
with the dollar sign in hledger-web, write 'cur:\$'.
* On the command line, some metacharacters like '$' have a special
meaning to the shell and so must be escaped at least once more.
See Special characters.

File: hledger.info, Node: Smart dates, Next: Report start & end date, Prev: Regular expressions, Up: OPTIONS
2.11 Smart dates
================
hledger's user interfaces accept a flexible "smart date" syntax (unlike hledger's user interfaces accept a flexible "smart date" syntax (unlike
dates in the journal file). Smart dates allow some english words, can dates in the journal file). Smart dates allow some english words, can
@ -1001,7 +1072,7 @@ results:
 
File: hledger.info, Node: Report start & end date, Next: Report intervals, Prev: Smart dates, Up: OPTIONS File: hledger.info, Node: Report start & end date, Next: Report intervals, Prev: Smart dates, Up: OPTIONS
2.10 Report start & end date 2.12 Report start & end date
============================ ============================
Most hledger reports show the full span of time represented by the Most hledger reports show the full span of time represented by the
@ -1039,7 +1110,7 @@ these accept the smart date syntax.
 
File: hledger.info, Node: Report intervals, Next: Period expressions, Prev: Report start & end date, Up: OPTIONS File: hledger.info, Node: Report intervals, Next: Period expressions, Prev: Report start & end date, Up: OPTIONS
2.11 Report intervals 2.13 Report intervals
===================== =====================
A report interval can be specified so that commands like register, A report interval can be specified so that commands like register,
@ -1052,7 +1123,7 @@ intervals can not be specified with a query.
 
File: hledger.info, Node: Period expressions, Next: Depth limiting, Prev: Report intervals, Up: OPTIONS File: hledger.info, Node: Period expressions, Next: Depth limiting, Prev: Report intervals, Up: OPTIONS
2.12 Period expressions 2.14 Period expressions
======================= =======================
The '-p/--period' option accepts period expressions, a shorthand way of The '-p/--period' option accepts period expressions, a shorthand way of
@ -1160,7 +1231,7 @@ start date and exclusive end date):
 
File: hledger.info, Node: Depth limiting, Next: Pivoting, Prev: Period expressions, Up: OPTIONS File: hledger.info, Node: Depth limiting, Next: Pivoting, Prev: Period expressions, Up: OPTIONS
2.13 Depth limiting 2.15 Depth limiting
=================== ===================
With the '--depth N' option (short form: '-N'), commands like account, With the '--depth N' option (short form: '-N'), commands like account,
@ -1172,7 +1243,7 @@ less detail. This flag has the same effect as a 'depth:' query argument
 
File: hledger.info, Node: Pivoting, Next: Valuation, Prev: Depth limiting, Up: OPTIONS File: hledger.info, Node: Pivoting, Next: Valuation, Prev: Depth limiting, Up: OPTIONS
2.14 Pivoting 2.16 Pivoting
============= =============
Normally hledger sums amounts, and organizes them in a hierarchy, based Normally hledger sums amounts, and organizes them in a hierarchy, based
@ -1227,9 +1298,9 @@ $ hledger balance --pivot member acct:.
-2 EUR -2 EUR
 
File: hledger.info, Node: Valuation, Next: Output destination, Prev: Pivoting, Up: OPTIONS File: hledger.info, Node: Valuation, Prev: Pivoting, Up: OPTIONS
2.15 Valuation 2.17 Valuation
============== ==============
* Menu: * Menu:
@ -1244,7 +1315,7 @@ File: hledger.info, Node: Valuation, Next: Output destination, Prev: Pivoting
 
File: hledger.info, Node: -B Cost, Next: -V Market value, Up: Valuation File: hledger.info, Node: -B Cost, Next: -V Market value, Up: Valuation
2.15.1 -B: Cost 2.17.1 -B: Cost
--------------- ---------------
The '-B/--cost' flag converts amounts to their cost (or selling price) The '-B/--cost' flag converts amounts to their cost (or selling price)
@ -1254,7 +1325,7 @@ flag is equivalent to '--value=cost', described below.
 
File: hledger.info, Node: -V Market value, Next: -X Market value in specified commodity, Prev: -B Cost, Up: Valuation File: hledger.info, Node: -V Market value, Next: -X Market value in specified commodity, Prev: -B Cost, Up: Valuation
2.15.2 -V: Market value 2.17.2 -V: Market value
----------------------- -----------------------
The '-V/--market' flag converts reported amounts to their market value The '-V/--market' flag converts reported amounts to their market value
@ -1304,7 +1375,7 @@ $ hledger -f t.j bal -N euros -V
 
File: hledger.info, Node: -X Market value in specified commodity, Next: --value Flexible valuation, Prev: -V Market value, Up: Valuation File: hledger.info, Node: -X Market value in specified commodity, Next: --value Flexible valuation, Prev: -V Market value, Up: Valuation
2.15.3 -X: Market value in specified commodity 2.17.3 -X: Market value in specified commodity
---------------------------------------------- ----------------------------------------------
The '-X/--exchange' option is like '-V', except it specifies the target The '-X/--exchange' option is like '-V', except it specifies the target
@ -1314,7 +1385,7 @@ commodity you would like to convert to. It is equivalent to
 
File: hledger.info, Node: --value Flexible valuation, Next: Effect of --value on reports, Prev: -X Market value in specified commodity, Up: Valuation File: hledger.info, Node: --value Flexible valuation, Next: Effect of --value on reports, Prev: -X Market value in specified commodity, Up: Valuation
2.15.4 -value: Flexible valuation 2.17.4 -value: Flexible valuation
--------------------------------- ---------------------------------
_(experimental, added 201905)_ _(experimental, added 201905)_
@ -1480,7 +1551,7 @@ $ hledger print -X A
 
File: hledger.info, Node: Effect of --value on reports, Next: Combining -B -V -X --value, Prev: --value Flexible valuation, Up: Valuation File: hledger.info, Node: Effect of --value on reports, Next: Combining -B -V -X --value, Prev: --value Flexible valuation, Up: Valuation
2.15.5 Effect of -value on reports 2.17.5 Effect of -value on reports
---------------------------------- ----------------------------------
Here is a reference for how '--value' currently affects each part of Here is a reference for how '--value' currently affects each part of
@ -1587,78 +1658,11 @@ _report interval_
 
File: hledger.info, Node: Combining -B -V -X --value, Prev: Effect of --value on reports, Up: Valuation File: hledger.info, Node: Combining -B -V -X --value, Prev: Effect of --value on reports, Up: Valuation
2.15.6 Combining -B, -V, -X, -value 2.17.6 Combining -B, -V, -X, -value
----------------------------------- -----------------------------------
The rightmost of these flags wins. The rightmost of these flags wins.

File: hledger.info, Node: Output destination, Next: Output format, Prev: Valuation, Up: OPTIONS
2.16 Output destination
=======================
Some commands (print, register, stats, the balance commands) can write
their output to a destination other than the console. This is
controlled by the '-o/--output-file' option.
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE

File: hledger.info, Node: Output format, Next: Regular expressions, Prev: Output destination, Up: OPTIONS
2.17 Output format
==================
Some commands can write their output in other formats. Eg print and
register can output CSV, and the balance commands can output CSV or
HTML. This is controlled by the '-O/--output-format' option, or by
specifying a '.csv' or '.html' file extension with '-o/--output-file'.
$ hledger balance -O csv # write CSV to stdout
$ hledger balance -o FILE.csv # write CSV to FILE.csv

File: hledger.info, Node: Regular expressions, Prev: Output format, Up: OPTIONS
2.18 Regular expressions
========================
hledger uses regular expressions in a number of places:
* query terms, on the command line and in the hledger-web search
form: 'REGEX', 'desc:REGEX', 'cur:REGEX', 'tag:...=REGEX'
* CSV rules conditional blocks: 'if REGEX ...'
* account alias directives and options: 'alias /REGEX/ =
REPLACEMENT', '--alias /REGEX/=REPLACEMENT'
hledger's regular expressions come from the regex-tdfa library. In
general they:
* are case insensitive
* are infix matching (do not need to match the entire thing being
matched)
* are POSIX extended regular expressions
* also support GNU word boundaries (\<, \>, \b, \B)
* and parenthesised capturing groups and numeric backreferences in
replacement strings
* do not support mode modifiers like (?s)
Some things to note:
* In the 'alias' directive and '--alias' option, regular expressions
must be enclosed in forward slashes ('/REGEX/'). Elsewhere in
hledger, these are not required.
* In queries, to match a regular expression metacharacter like '$' as
a literal character, prepend a backslash. Eg to search for amounts
with the dollar sign in hledger-web, write 'cur:\$'.
* On the command line, some metacharacters like '$' have a special
meaning to the shell and so must be escaped at least once more.
See Special characters.
 
File: hledger.info, Node: COMMANDS, Next: ENVIRONMENT, Prev: OPTIONS, Up: Top File: hledger.info, Node: COMMANDS, Next: ENVIRONMENT, Prev: OPTIONS, Up: Top
@ -3644,185 +3648,185 @@ Tag Table:
Node: Top68 Node: Top68
Node: COMMON TASKS2321 Node: COMMON TASKS2321
Ref: #common-tasks2433 Ref: #common-tasks2433
Node: Get help2796 Node: Getting help2832
Ref: #get-help2908 Ref: #getting-help2965
Node: Starting a Journal3461 Node: Constructing a command line3518
Ref: #starting-a-journal3626 Ref: #constructing-a-command-line3708
Node: Setting Opening Balances4814 Node: Starting a Journal4405
Ref: #setting-opening-balances5005 Ref: #starting-a-journal4589
Node: Recording Transactions8148 Node: Setting Opening Balances5777
Ref: #recording-transactions8328 Ref: #setting-opening-balances5968
Node: Reconciling8884 Node: Recording Transactions9111
Ref: #reconciling9027 Ref: #recording-transactions9291
Node: Reporting11285 Node: Reconciling9847
Ref: #reporting11421 Ref: #reconciling9990
Node: Starting a New File15420 Node: Reporting12248
Ref: #starting-a-new-file15556 Ref: #reporting12384
Node: OPTIONS15785 Node: Starting a New File16383
Ref: #options15892 Ref: #starting-a-new-file16519
Node: General options16284 Node: OPTIONS16748
Ref: #general-options16409 Ref: #options16855
Node: Command options19108 Node: General options17225
Ref: #command-options19259 Ref: #general-options17350
Node: Command arguments19657 Node: Command options20049
Ref: #command-arguments19804 Ref: #command-options20200
Node: Queries20684 Node: Command arguments20598
Ref: #queries20839 Ref: #command-arguments20745
Node: Special characters in arguments and queries24801 Node: Queries21625
Ref: #special-characters-in-arguments-and-queries25028 Ref: #queries21780
Node: More escaping25479 Node: Special characters in arguments and queries25742
Ref: #more-escaping25641 Ref: #special-characters-in-arguments-and-queries25970
Node: Even more escaping25937 Node: More escaping26421
Ref: #even-more-escaping26131 Ref: #more-escaping26583
Node: Less escaping26802 Node: Even more escaping26879
Ref: #less-escaping26964 Ref: #even-more-escaping27073
Node: Command line tips27209 Node: Less escaping27744
Ref: #command-line-tips27395 Ref: #less-escaping27906
Node: Unicode characters27772 Node: Unicode characters28151
Ref: #unicode-characters27928 Ref: #unicode-characters28333
Node: Input files29340 Node: Input files29745
Ref: #input-files29476 Ref: #input-files29888
Node: Smart dates31405 Node: Output destination31817
Ref: #smart-dates31546 Ref: #output-destination31969
Node: Report start & end date32952 Node: Output format32252
Ref: #report-start-end-date33124 Ref: #output-format32402
Node: Report intervals34548 Node: Regular expressions32787
Ref: #report-intervals34713 Ref: #regular-expressions32944
Node: Period expressions35103 Node: Smart dates34305
Ref: #period-expressions35263 Ref: #smart-dates34456
Node: Depth limiting39218 Node: Report start & end date35862
Ref: #depth-limiting39362 Ref: #report-start-end-date36034
Node: Pivoting39704 Node: Report intervals37458
Ref: #pivoting39827 Ref: #report-intervals37623
Node: Valuation41503 Node: Period expressions38013
Ref: #valuation41632 Ref: #period-expressions38173
Node: -B Cost41812 Node: Depth limiting42128
Ref: #b-cost41923 Ref: #depth-limiting42272
Node: -V Market value42121 Node: Pivoting42614
Ref: #v-market-value42295 Ref: #pivoting42737
Node: -X Market value in specified commodity43727 Node: Valuation44413
Ref: #x-market-value-in-specified-commodity43966 Ref: #valuation44515
Node: --value Flexible valuation44142 Node: -B Cost44695
Ref: #value-flexible-valuation44368 Ref: #b-cost44806
Node: Effect of --value on reports48558 Node: -V Market value45004
Ref: #effect-of---value-on-reports48774 Ref: #v-market-value45178
Node: Combining -B -V -X --value53705 Node: -X Market value in specified commodity46610
Ref: #combining--b--v--x---value53888 Ref: #x-market-value-in-specified-commodity46849
Node: Output destination53924 Node: --value Flexible valuation47025
Ref: #output-destination54076 Ref: #value-flexible-valuation47251
Node: Output format54359 Node: Effect of --value on reports51441
Ref: #output-format54511 Ref: #effect-of---value-on-reports51657
Node: Regular expressions54896 Node: Combining -B -V -X --value56588
Ref: #regular-expressions55033 Ref: #combining--b--v--x---value56771
Node: COMMANDS56394 Node: COMMANDS56807
Ref: #commands56502 Ref: #commands56915
Node: accounts57586 Node: accounts57999
Ref: #accounts57684 Ref: #accounts58097
Node: activity58383 Node: activity58796
Ref: #activity58493 Ref: #activity58906
Node: add58876 Node: add59289
Ref: #add58975 Ref: #add59388
Node: balance61714 Node: balance62127
Ref: #balance61825 Ref: #balance62238
Node: Classic balance report63283 Node: Classic balance report63696
Ref: #classic-balance-report63456 Ref: #classic-balance-report63869
Node: Customising the classic balance report64825 Node: Customising the classic balance report65238
Ref: #customising-the-classic-balance-report65053 Ref: #customising-the-classic-balance-report65466
Node: Colour support67129 Node: Colour support67542
Ref: #colour-support67296 Ref: #colour-support67709
Node: Flat mode67469 Node: Flat mode67882
Ref: #flat-mode67617 Ref: #flat-mode68030
Node: Depth limited balance reports68030 Node: Depth limited balance reports68443
Ref: #depth-limited-balance-reports68215 Ref: #depth-limited-balance-reports68628
Node: Percentages68671 Node: Percentages69084
Ref: #percentages68837 Ref: #percentages69250
Node: Multicolumn balance report69974 Node: Multicolumn balance report70387
Ref: #multicolumn-balance-report70154 Ref: #multicolumn-balance-report70567
Node: Budget report75468 Node: Budget report75881
Ref: #budget-report75611 Ref: #budget-report76024
Node: Nested budgets80813 Node: Nested budgets81226
Ref: #nested-budgets80925 Ref: #nested-budgets81338
Ref: #output-format-184406 Ref: #output-format-184819
Node: balancesheet84484 Node: balancesheet84897
Ref: #balancesheet84620 Ref: #balancesheet85033
Node: balancesheetequity86003 Node: balancesheetequity86416
Ref: #balancesheetequity86152 Ref: #balancesheetequity86565
Node: cashflow86713 Node: cashflow87126
Ref: #cashflow86841 Ref: #cashflow87254
Node: check-dates87937 Node: check-dates88350
Ref: #check-dates88064 Ref: #check-dates88477
Node: check-dupes88343 Node: check-dupes88756
Ref: #check-dupes88467 Ref: #check-dupes88880
Node: close88760 Node: close89173
Ref: #close88874 Ref: #close89287
Node: close usage90396 Node: close usage90809
Ref: #close-usage90489 Ref: #close-usage90902
Node: commodities93302 Node: commodities93715
Ref: #commodities93429 Ref: #commodities93842
Node: descriptions93511 Node: descriptions93924
Ref: #descriptions93639 Ref: #descriptions94052
Node: diff93820 Node: diff94233
Ref: #diff93926 Ref: #diff94339
Node: files94973 Node: files95386
Ref: #files95073 Ref: #files95486
Node: help95220 Node: help95633
Ref: #help95320 Ref: #help95733
Node: import96401 Node: import96814
Ref: #import96515 Ref: #import96928
Node: Importing balance assignments97408 Node: Importing balance assignments97821
Ref: #importing-balance-assignments97556 Ref: #importing-balance-assignments97969
Node: incomestatement98205 Node: incomestatement98618
Ref: #incomestatement98338 Ref: #incomestatement98751
Node: notes99742 Node: notes100155
Ref: #notes99855 Ref: #notes100268
Node: payees99981 Node: payees100394
Ref: #payees100087 Ref: #payees100500
Node: prices100245 Node: prices100658
Ref: #prices100351 Ref: #prices100764
Node: print100692 Node: print101105
Ref: #print100802 Ref: #print101215
Node: print-unique105446 Node: print-unique105859
Ref: #print-unique105572 Ref: #print-unique105985
Node: register105857 Node: register106270
Ref: #register105984 Ref: #register106397
Node: Custom register output110156 Node: Custom register output110569
Ref: #custom-register-output110285 Ref: #custom-register-output110698
Node: register-match111547 Node: register-match111960
Ref: #register-match111681 Ref: #register-match112094
Node: rewrite112032 Node: rewrite112445
Ref: #rewrite112147 Ref: #rewrite112560
Node: Re-write rules in a file114002 Node: Re-write rules in a file114415
Ref: #re-write-rules-in-a-file114136 Ref: #re-write-rules-in-a-file114549
Node: Diff output format115346 Node: Diff output format115759
Ref: #diff-output-format115515 Ref: #diff-output-format115928
Node: rewrite vs print --auto116607 Node: rewrite vs print --auto117020
Ref: #rewrite-vs.-print---auto116786 Ref: #rewrite-vs.-print---auto117199
Node: roi117342 Node: roi117755
Ref: #roi117440 Ref: #roi117853
Node: stats118452 Node: stats118865
Ref: #stats118551 Ref: #stats118964
Node: tags119339 Node: tags119752
Ref: #tags119437 Ref: #tags119850
Node: test119731 Node: test120144
Ref: #test119839 Ref: #test120252
Node: Add-on Commands120586 Node: Add-on Commands120999
Ref: #add-on-commands120703 Ref: #add-on-commands121116
Node: ui122046 Node: ui122459
Ref: #ui122134 Ref: #ui122547
Node: web122188 Node: web122601
Ref: #web122291 Ref: #web122704
Node: iadd122407 Node: iadd122820
Ref: #iadd122518 Ref: #iadd122931
Node: interest122600 Node: interest123013
Ref: #interest122707 Ref: #interest123120
Node: ENVIRONMENT122947 Node: ENVIRONMENT123360
Ref: #environment123059 Ref: #environment123472
Node: FILES123888 Node: FILES124301
Ref: #files-1123991 Ref: #files-1124404
Node: LIMITATIONS124204 Node: LIMITATIONS124617
Ref: #limitations124323 Ref: #limitations124736
Node: TROUBLESHOOTING125065 Node: TROUBLESHOOTING125478
Ref: #troubleshooting125178 Ref: #troubleshooting125591
 
End Tag Table End Tag Table

File diff suppressed because it is too large Load Diff