;doc: regen manuals
[ci skip]
This commit is contained in:
		
							parent
							
								
									fe96d089a1
								
							
						
					
					
						commit
						202d2e945b
					
				| @ -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 | ||||
| hledger_journal(5) manual, or the more extensive docs at | ||||
| https://hledger.org. | ||||
| .SS Get help | ||||
| .SS Getting help | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| @ -90,6 +90,26 @@ $ hledger help --help     # show more detailed help for the help command | ||||
| .PP | ||||
| Find more docs, chat, mail list, reddit, issue tracker: | ||||
| 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 | ||||
| .PP | ||||
| hledger looks for your accounting data in a journal file, | ||||
| @ -873,20 +893,6 @@ And backslashes may work better than quotes. | ||||
| Eg: | ||||
| .PP | ||||
| \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 | ||||
| .PP | ||||
| 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 | ||||
| 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]. | ||||
| .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 | ||||
| .PP | ||||
| 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 | ||||
| .PP | ||||
| 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 | ||||
| .PP | ||||
| hledger provides a number of subcommands; \f[C]hledger\f[R] with no | ||||
|  | ||||
| @ -75,7 +75,8 @@ https://hledger.org. | ||||
| 
 | ||||
| * Menu: | ||||
| 
 | ||||
| * Get help:: | ||||
| * Getting help:: | ||||
| * Constructing a command line:: | ||||
| * Starting a Journal:: | ||||
| * Setting Opening Balances:: | ||||
| * Recording Transactions:: | ||||
| @ -84,10 +85,10 @@ https://hledger.org. | ||||
| * 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 --help          # show common options | ||||
| @ -101,9 +102,29 @@ $ hledger help --help     # show more detailed help for the help command | ||||
| 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, | ||||
| @ -142,7 +163,7 @@ Market prices            : 0 () | ||||
|  | ||||
| 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 | ||||
| @ -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 | ||||
| 
 | ||||
| 1.4 Recording Transactions | ||||
| 1.5 Recording Transactions | ||||
| ========================== | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 1.5 Reconciling | ||||
| 1.6 Reconciling | ||||
| =============== | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 1.6 Reporting | ||||
| 1.7 Reporting | ||||
| ============= | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 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 | ||||
| @ -475,9 +496,11 @@ File: hledger.info,  Node: OPTIONS,  Next: COMMANDS,  Prev: COMMON TASKS,  Up: T | ||||
| * Command arguments:: | ||||
| * Queries:: | ||||
| * Special characters in arguments and queries:: | ||||
| * Command line tips:: | ||||
| * Unicode characters:: | ||||
| * Input files:: | ||||
| * Output destination:: | ||||
| * Output format:: | ||||
| * Regular expressions:: | ||||
| * Smart dates:: | ||||
| * Report start & end date:: | ||||
| * Report intervals:: | ||||
| @ -485,9 +508,6 @@ File: hledger.info,  Node: OPTIONS,  Next: COMMANDS,  Prev: COMMON TASKS,  Up: T | ||||
| * Depth limiting:: | ||||
| * Pivoting:: | ||||
| * Valuation:: | ||||
| * Output destination:: | ||||
| * Output format:: | ||||
| * Regular expressions:: | ||||
| 
 | ||||
|  | ||||
| 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). | ||||
| 
 | ||||
|  | ||||
| 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 | ||||
| =============================================== | ||||
| @ -856,25 +876,9 @@ Eg: | ||||
|    '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 | ||||
| ===================== | ||||
| 
 | ||||
| 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 | ||||
| 2.6 Unicode characters | ||||
| ====================== | ||||
| 
 | ||||
| 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). | ||||
| 
 | ||||
|  | ||||
| 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 | ||||
| @ -966,10 +970,77 @@ one big journal.  There are some limitations with this: | ||||
| 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 | ||||
| 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 | ||||
| 
 | ||||
| 2.10 Report start & end date | ||||
| 2.12 Report start & end date | ||||
| ============================ | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 2.11 Report intervals | ||||
| 2.13 Report intervals | ||||
| ===================== | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 2.12 Period expressions | ||||
| 2.14 Period expressions | ||||
| ======================= | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 2.13 Depth limiting | ||||
| 2.15 Depth limiting | ||||
| =================== | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 2.14 Pivoting | ||||
| 2.16 Pivoting | ||||
| ============= | ||||
| 
 | ||||
| Normally hledger sums amounts, and organizes them in a hierarchy, based | ||||
| @ -1227,9 +1298,9 @@ $ hledger balance --pivot member acct:. | ||||
|               -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: | ||||
| @ -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 | ||||
| 
 | ||||
| 2.15.1 -B: Cost | ||||
| 2.17.1 -B: Cost | ||||
| --------------- | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| 2.15.2 -V: Market value | ||||
| 2.17.2 -V: 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 | ||||
| 
 | ||||
| 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 | ||||
| @ -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 | ||||
| 
 | ||||
| 2.15.4 -value: Flexible valuation | ||||
| 2.17.4 -value: Flexible valuation | ||||
| --------------------------------- | ||||
| 
 | ||||
| _(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 | ||||
| 
 | ||||
| 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 | ||||
| @ -1587,78 +1658,11 @@ _report interval_ | ||||
|  | ||||
| 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. | ||||
| 
 | ||||
|  | ||||
| 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 | ||||
| 
 | ||||
| @ -3644,185 +3648,185 @@ Tag Table: | ||||
| Node: Top68 | ||||
| Node: COMMON TASKS2321 | ||||
| Ref: #common-tasks2433 | ||||
| Node: Get help2796 | ||||
| Ref: #get-help2908 | ||||
| Node: Starting a Journal3461 | ||||
| Ref: #starting-a-journal3626 | ||||
| Node: Setting Opening Balances4814 | ||||
| Ref: #setting-opening-balances5005 | ||||
| Node: Recording Transactions8148 | ||||
| Ref: #recording-transactions8328 | ||||
| Node: Reconciling8884 | ||||
| Ref: #reconciling9027 | ||||
| Node: Reporting11285 | ||||
| Ref: #reporting11421 | ||||
| Node: Starting a New File15420 | ||||
| Ref: #starting-a-new-file15556 | ||||
| Node: OPTIONS15785 | ||||
| Ref: #options15892 | ||||
| Node: General options16284 | ||||
| Ref: #general-options16409 | ||||
| Node: Command options19108 | ||||
| Ref: #command-options19259 | ||||
| Node: Command arguments19657 | ||||
| Ref: #command-arguments19804 | ||||
| Node: Queries20684 | ||||
| Ref: #queries20839 | ||||
| Node: Special characters in arguments and queries24801 | ||||
| Ref: #special-characters-in-arguments-and-queries25028 | ||||
| Node: More escaping25479 | ||||
| Ref: #more-escaping25641 | ||||
| Node: Even more escaping25937 | ||||
| Ref: #even-more-escaping26131 | ||||
| Node: Less escaping26802 | ||||
| Ref: #less-escaping26964 | ||||
| Node: Command line tips27209 | ||||
| Ref: #command-line-tips27395 | ||||
| Node: Unicode characters27772 | ||||
| Ref: #unicode-characters27928 | ||||
| Node: Input files29340 | ||||
| Ref: #input-files29476 | ||||
| Node: Smart dates31405 | ||||
| Ref: #smart-dates31546 | ||||
| Node: Report start & end date32952 | ||||
| Ref: #report-start-end-date33124 | ||||
| Node: Report intervals34548 | ||||
| Ref: #report-intervals34713 | ||||
| Node: Period expressions35103 | ||||
| Ref: #period-expressions35263 | ||||
| Node: Depth limiting39218 | ||||
| Ref: #depth-limiting39362 | ||||
| Node: Pivoting39704 | ||||
| Ref: #pivoting39827 | ||||
| Node: Valuation41503 | ||||
| Ref: #valuation41632 | ||||
| Node: -B Cost41812 | ||||
| Ref: #b-cost41923 | ||||
| Node: -V Market value42121 | ||||
| Ref: #v-market-value42295 | ||||
| Node: -X Market value in specified commodity43727 | ||||
| Ref: #x-market-value-in-specified-commodity43966 | ||||
| Node: --value Flexible valuation44142 | ||||
| Ref: #value-flexible-valuation44368 | ||||
| Node: Effect of --value on reports48558 | ||||
| Ref: #effect-of---value-on-reports48774 | ||||
| Node: Combining -B -V -X --value53705 | ||||
| Ref: #combining--b--v--x---value53888 | ||||
| Node: Output destination53924 | ||||
| Ref: #output-destination54076 | ||||
| Node: Output format54359 | ||||
| Ref: #output-format54511 | ||||
| Node: Regular expressions54896 | ||||
| Ref: #regular-expressions55033 | ||||
| Node: COMMANDS56394 | ||||
| Ref: #commands56502 | ||||
| Node: accounts57586 | ||||
| Ref: #accounts57684 | ||||
| Node: activity58383 | ||||
| Ref: #activity58493 | ||||
| Node: add58876 | ||||
| Ref: #add58975 | ||||
| Node: balance61714 | ||||
| Ref: #balance61825 | ||||
| Node: Classic balance report63283 | ||||
| Ref: #classic-balance-report63456 | ||||
| Node: Customising the classic balance report64825 | ||||
| Ref: #customising-the-classic-balance-report65053 | ||||
| Node: Colour support67129 | ||||
| Ref: #colour-support67296 | ||||
| Node: Flat mode67469 | ||||
| Ref: #flat-mode67617 | ||||
| Node: Depth limited balance reports68030 | ||||
| Ref: #depth-limited-balance-reports68215 | ||||
| Node: Percentages68671 | ||||
| Ref: #percentages68837 | ||||
| Node: Multicolumn balance report69974 | ||||
| Ref: #multicolumn-balance-report70154 | ||||
| Node: Budget report75468 | ||||
| Ref: #budget-report75611 | ||||
| Node: Nested budgets80813 | ||||
| Ref: #nested-budgets80925 | ||||
| Ref: #output-format-184406 | ||||
| Node: balancesheet84484 | ||||
| Ref: #balancesheet84620 | ||||
| Node: balancesheetequity86003 | ||||
| Ref: #balancesheetequity86152 | ||||
| Node: cashflow86713 | ||||
| Ref: #cashflow86841 | ||||
| Node: check-dates87937 | ||||
| Ref: #check-dates88064 | ||||
| Node: check-dupes88343 | ||||
| Ref: #check-dupes88467 | ||||
| Node: close88760 | ||||
| Ref: #close88874 | ||||
| Node: close usage90396 | ||||
| Ref: #close-usage90489 | ||||
| Node: commodities93302 | ||||
| Ref: #commodities93429 | ||||
| Node: descriptions93511 | ||||
| Ref: #descriptions93639 | ||||
| Node: diff93820 | ||||
| Ref: #diff93926 | ||||
| Node: files94973 | ||||
| Ref: #files95073 | ||||
| Node: help95220 | ||||
| Ref: #help95320 | ||||
| Node: import96401 | ||||
| Ref: #import96515 | ||||
| Node: Importing balance assignments97408 | ||||
| Ref: #importing-balance-assignments97556 | ||||
| Node: incomestatement98205 | ||||
| Ref: #incomestatement98338 | ||||
| Node: notes99742 | ||||
| Ref: #notes99855 | ||||
| Node: payees99981 | ||||
| Ref: #payees100087 | ||||
| Node: prices100245 | ||||
| Ref: #prices100351 | ||||
| Node: print100692 | ||||
| Ref: #print100802 | ||||
| Node: print-unique105446 | ||||
| Ref: #print-unique105572 | ||||
| Node: register105857 | ||||
| Ref: #register105984 | ||||
| Node: Custom register output110156 | ||||
| Ref: #custom-register-output110285 | ||||
| Node: register-match111547 | ||||
| Ref: #register-match111681 | ||||
| Node: rewrite112032 | ||||
| Ref: #rewrite112147 | ||||
| Node: Re-write rules in a file114002 | ||||
| Ref: #re-write-rules-in-a-file114136 | ||||
| Node: Diff output format115346 | ||||
| Ref: #diff-output-format115515 | ||||
| Node: rewrite vs print --auto116607 | ||||
| Ref: #rewrite-vs.-print---auto116786 | ||||
| Node: roi117342 | ||||
| Ref: #roi117440 | ||||
| Node: stats118452 | ||||
| Ref: #stats118551 | ||||
| Node: tags119339 | ||||
| Ref: #tags119437 | ||||
| Node: test119731 | ||||
| Ref: #test119839 | ||||
| Node: Add-on Commands120586 | ||||
| Ref: #add-on-commands120703 | ||||
| Node: ui122046 | ||||
| Ref: #ui122134 | ||||
| Node: web122188 | ||||
| Ref: #web122291 | ||||
| Node: iadd122407 | ||||
| Ref: #iadd122518 | ||||
| Node: interest122600 | ||||
| Ref: #interest122707 | ||||
| Node: ENVIRONMENT122947 | ||||
| Ref: #environment123059 | ||||
| Node: FILES123888 | ||||
| Ref: #files-1123991 | ||||
| Node: LIMITATIONS124204 | ||||
| Ref: #limitations124323 | ||||
| Node: TROUBLESHOOTING125065 | ||||
| Ref: #troubleshooting125178 | ||||
| Node: Getting help2832 | ||||
| Ref: #getting-help2965 | ||||
| Node: Constructing a command line3518 | ||||
| Ref: #constructing-a-command-line3708 | ||||
| Node: Starting a Journal4405 | ||||
| Ref: #starting-a-journal4589 | ||||
| Node: Setting Opening Balances5777 | ||||
| Ref: #setting-opening-balances5968 | ||||
| Node: Recording Transactions9111 | ||||
| Ref: #recording-transactions9291 | ||||
| Node: Reconciling9847 | ||||
| Ref: #reconciling9990 | ||||
| Node: Reporting12248 | ||||
| Ref: #reporting12384 | ||||
| Node: Starting a New File16383 | ||||
| Ref: #starting-a-new-file16519 | ||||
| Node: OPTIONS16748 | ||||
| Ref: #options16855 | ||||
| Node: General options17225 | ||||
| Ref: #general-options17350 | ||||
| Node: Command options20049 | ||||
| Ref: #command-options20200 | ||||
| Node: Command arguments20598 | ||||
| Ref: #command-arguments20745 | ||||
| Node: Queries21625 | ||||
| Ref: #queries21780 | ||||
| Node: Special characters in arguments and queries25742 | ||||
| Ref: #special-characters-in-arguments-and-queries25970 | ||||
| Node: More escaping26421 | ||||
| Ref: #more-escaping26583 | ||||
| Node: Even more escaping26879 | ||||
| Ref: #even-more-escaping27073 | ||||
| Node: Less escaping27744 | ||||
| Ref: #less-escaping27906 | ||||
| Node: Unicode characters28151 | ||||
| Ref: #unicode-characters28333 | ||||
| Node: Input files29745 | ||||
| Ref: #input-files29888 | ||||
| Node: Output destination31817 | ||||
| Ref: #output-destination31969 | ||||
| Node: Output format32252 | ||||
| Ref: #output-format32402 | ||||
| Node: Regular expressions32787 | ||||
| Ref: #regular-expressions32944 | ||||
| Node: Smart dates34305 | ||||
| Ref: #smart-dates34456 | ||||
| Node: Report start & end date35862 | ||||
| Ref: #report-start-end-date36034 | ||||
| Node: Report intervals37458 | ||||
| Ref: #report-intervals37623 | ||||
| Node: Period expressions38013 | ||||
| Ref: #period-expressions38173 | ||||
| Node: Depth limiting42128 | ||||
| Ref: #depth-limiting42272 | ||||
| Node: Pivoting42614 | ||||
| Ref: #pivoting42737 | ||||
| Node: Valuation44413 | ||||
| Ref: #valuation44515 | ||||
| Node: -B Cost44695 | ||||
| Ref: #b-cost44806 | ||||
| Node: -V Market value45004 | ||||
| Ref: #v-market-value45178 | ||||
| Node: -X Market value in specified commodity46610 | ||||
| Ref: #x-market-value-in-specified-commodity46849 | ||||
| Node: --value Flexible valuation47025 | ||||
| Ref: #value-flexible-valuation47251 | ||||
| Node: Effect of --value on reports51441 | ||||
| Ref: #effect-of---value-on-reports51657 | ||||
| Node: Combining -B -V -X --value56588 | ||||
| Ref: #combining--b--v--x---value56771 | ||||
| Node: COMMANDS56807 | ||||
| Ref: #commands56915 | ||||
| Node: accounts57999 | ||||
| Ref: #accounts58097 | ||||
| Node: activity58796 | ||||
| Ref: #activity58906 | ||||
| Node: add59289 | ||||
| Ref: #add59388 | ||||
| Node: balance62127 | ||||
| Ref: #balance62238 | ||||
| Node: Classic balance report63696 | ||||
| Ref: #classic-balance-report63869 | ||||
| Node: Customising the classic balance report65238 | ||||
| Ref: #customising-the-classic-balance-report65466 | ||||
| Node: Colour support67542 | ||||
| Ref: #colour-support67709 | ||||
| Node: Flat mode67882 | ||||
| Ref: #flat-mode68030 | ||||
| Node: Depth limited balance reports68443 | ||||
| Ref: #depth-limited-balance-reports68628 | ||||
| Node: Percentages69084 | ||||
| Ref: #percentages69250 | ||||
| Node: Multicolumn balance report70387 | ||||
| Ref: #multicolumn-balance-report70567 | ||||
| Node: Budget report75881 | ||||
| Ref: #budget-report76024 | ||||
| Node: Nested budgets81226 | ||||
| Ref: #nested-budgets81338 | ||||
| Ref: #output-format-184819 | ||||
| Node: balancesheet84897 | ||||
| Ref: #balancesheet85033 | ||||
| Node: balancesheetequity86416 | ||||
| Ref: #balancesheetequity86565 | ||||
| Node: cashflow87126 | ||||
| Ref: #cashflow87254 | ||||
| Node: check-dates88350 | ||||
| Ref: #check-dates88477 | ||||
| Node: check-dupes88756 | ||||
| Ref: #check-dupes88880 | ||||
| Node: close89173 | ||||
| Ref: #close89287 | ||||
| Node: close usage90809 | ||||
| Ref: #close-usage90902 | ||||
| Node: commodities93715 | ||||
| Ref: #commodities93842 | ||||
| Node: descriptions93924 | ||||
| Ref: #descriptions94052 | ||||
| Node: diff94233 | ||||
| Ref: #diff94339 | ||||
| Node: files95386 | ||||
| Ref: #files95486 | ||||
| Node: help95633 | ||||
| Ref: #help95733 | ||||
| Node: import96814 | ||||
| Ref: #import96928 | ||||
| Node: Importing balance assignments97821 | ||||
| Ref: #importing-balance-assignments97969 | ||||
| Node: incomestatement98618 | ||||
| Ref: #incomestatement98751 | ||||
| Node: notes100155 | ||||
| Ref: #notes100268 | ||||
| Node: payees100394 | ||||
| Ref: #payees100500 | ||||
| Node: prices100658 | ||||
| Ref: #prices100764 | ||||
| Node: print101105 | ||||
| Ref: #print101215 | ||||
| Node: print-unique105859 | ||||
| Ref: #print-unique105985 | ||||
| Node: register106270 | ||||
| Ref: #register106397 | ||||
| Node: Custom register output110569 | ||||
| Ref: #custom-register-output110698 | ||||
| Node: register-match111960 | ||||
| Ref: #register-match112094 | ||||
| Node: rewrite112445 | ||||
| Ref: #rewrite112560 | ||||
| Node: Re-write rules in a file114415 | ||||
| Ref: #re-write-rules-in-a-file114549 | ||||
| Node: Diff output format115759 | ||||
| Ref: #diff-output-format115928 | ||||
| Node: rewrite vs print --auto117020 | ||||
| Ref: #rewrite-vs.-print---auto117199 | ||||
| Node: roi117755 | ||||
| Ref: #roi117853 | ||||
| Node: stats118865 | ||||
| Ref: #stats118964 | ||||
| Node: tags119752 | ||||
| Ref: #tags119850 | ||||
| Node: test120144 | ||||
| Ref: #test120252 | ||||
| Node: Add-on Commands120999 | ||||
| Ref: #add-on-commands121116 | ||||
| Node: ui122459 | ||||
| Ref: #ui122547 | ||||
| Node: web122601 | ||||
| Ref: #web122704 | ||||
| Node: iadd122820 | ||||
| Ref: #iadd122931 | ||||
| Node: interest123013 | ||||
| Ref: #interest123120 | ||||
| Node: ENVIRONMENT123360 | ||||
| Ref: #environment123472 | ||||
| Node: FILES124301 | ||||
| Ref: #files-1124404 | ||||
| Node: LIMITATIONS124617 | ||||
| Ref: #limitations124736 | ||||
| Node: TROUBLESHOOTING125478 | ||||
| Ref: #troubleshooting125591 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										1078
									
								
								hledger/hledger.txt
									
									
									
									
									
								
							
							
						
						
									
										1078
									
								
								hledger/hledger.txt
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user