From 01a2aa939432cfbce8dea4538d9c57f55a793047 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 29 Mar 2017 14:35:59 -0700 Subject: [PATCH] doc: update generated files --- hledger-api/doc/hledger-api.1 | 63 +-- hledger-api/doc/hledger-api.1.info | 44 +- hledger-api/doc/hledger-api.1.txt | 51 +-- hledger-ui/doc/hledger-ui.1 | 81 ++-- hledger-ui/doc/hledger-ui.1.info | 82 ++-- hledger-ui/doc/hledger-ui.1.txt | 207 ++++----- hledger-web/doc/hledger-web.1 | 81 ++-- hledger-web/doc/hledger-web.1.info | 58 +-- hledger-web/doc/hledger-web.1.txt | 61 +-- hledger/doc/hledger.1 | 125 +++--- hledger/doc/hledger.1.info | 398 +++++++++-------- hledger/doc/hledger.1.txt | 662 ++++++++++++++--------------- 12 files changed, 947 insertions(+), 966 deletions(-) diff --git a/hledger-api/doc/hledger-api.1 b/hledger-api/doc/hledger-api.1 index 6fc2f0fb6..209a56a92 100644 --- a/hledger-api/doc/hledger-api.1 +++ b/hledger-api/doc/hledger-api.1 @@ -12,10 +12,6 @@ hledger\-api \- web API server for the hledger accounting tool .PD 0 .P .PD -\f[C]hledger\-api\ \-\-swagger\f[] -.PD 0 -.P -.PD \f[C]hledger\ api\ \-\-\ [OPTIONS]\f[] .SH DESCRIPTION .PP @@ -51,13 +47,25 @@ server the API docs will be printed in Swagger 2.0 format. Note: if invoking hledger\-api as a hledger subcommand, write \f[C]\-\-\f[] before options as shown above. .TP +.B \f[C]\-f\ \-\-file=FILE\f[] +use a different input file. +For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or +\f[C]$HOME/.hledger.journal\f[]) +.RS +.RE +.TP .B \f[C]\-d\ \-\-static\-dir=DIR\f[] serve files from a different directory (default: \f[C]\&.\f[]) .RS .RE .TP +.B \f[C]\-\-host=IPADDR\f[] +listen on this IP address (default: 127.0.0.1) +.RS +.RE +.TP .B \f[C]\-p\ \-\-port=PORT\f[] -use a different TCP port (default: 8001) +listen on this TCP port (default: 8001) .RS .RE .TP @@ -65,58 +73,29 @@ use a different TCP port (default: 8001) print API docs in Swagger 2.0 format, and exit .RS .RE -.PP -hledger general options: -.TP -.B \f[C]\-h\f[] -show general usage (or after COMMAND, the command\[aq]s usage) -.RS -.RE -.TP -.B \f[C]\-\-help\f[] -show the current program\[aq]s manual as plain text (or after an add\-on -COMMAND, the add\-on\[aq]s manual) -.RS -.RE -.TP -.B \f[C]\-\-man\f[] -show the current program\[aq]s manual with man -.RS -.RE -.TP -.B \f[C]\-\-info\f[] -show the current program\[aq]s manual with info -.RS -.RE .TP .B \f[C]\-\-version\f[] show version .RS .RE .TP -.B \f[C]\-\-debug[=N]\f[] -show debug output (levels 1\-9, default: 1) +.B \f[C]\-h\f[] +show usage .RS .RE .TP -.B \f[C]\-f\ FILE\ \-\-file=FILE\f[] -use a different input file. -For stdin, use \- +.B \f[C]\-\-help\f[] +show manual as plain text .RS .RE .TP -.B \f[C]\-\-rules\-file=RULESFILE\f[] -Conversion rules file to use when reading CSV (default: FILE.rules) +.B \f[C]\-\-man\f[] +show manual with man .RS .RE .TP -.B \f[C]\-\-alias=OLD=NEW\f[] -display accounts named OLD as NEW -.RS -.RE -.TP -.B \f[C]\-I\ \-\-ignore\-assertions\f[] -ignore any failing balance assertions in the journal +.B \f[C]\-\-info\f[] +show manual with info .RS .RE .SH ENVIRONMENT diff --git a/hledger-api/doc/hledger-api.1.info b/hledger-api/doc/hledger-api.1.info index a04ec7bfd..3eae32cc8 100644 --- a/hledger-api/doc/hledger-api.1.info +++ b/hledger-api/doc/hledger-api.1.info @@ -38,49 +38,37 @@ File: hledger-api.1.info, Node: OPTIONS, Prev: Top, Up: Top Note: if invoking hledger-api as a hledger subcommand, write '--' before options as shown above. +'-f --file=FILE' + + use a different input file. For stdin, use - (default: + '$LEDGER_FILE' or '$HOME/.hledger.journal') '-d --static-dir=DIR' serve files from a different directory (default: '.') +'--host=IPADDR' + + listen on this IP address (default: 127.0.0.1) '-p --port=PORT' - use a different TCP port (default: 8001) + listen on this TCP port (default: 8001) '--swagger' print API docs in Swagger 2.0 format, and exit - - hledger general options: - -'-h' - - show general usage (or after COMMAND, the command's usage) -'--help' - - show the current program's manual as plain text (or after an add-on - COMMAND, the add-on's manual) -'--man' - - show the current program's manual with man -'--info' - - show the current program's manual with info '--version' show version -'--debug[=N]' +'-h' - show debug output (levels 1-9, default: 1) -'-f FILE --file=FILE' + show usage +'--help' - use a different input file. For stdin, use - -'--rules-file=RULESFILE' + show manual as plain text +'--man' - Conversion rules file to use when reading CSV (default: FILE.rules) -'--alias=OLD=NEW' + show manual with man +'--info' - display accounts named OLD as NEW -'-I --ignore-assertions' - - ignore any failing balance assertions in the journal + show manual with info  Tag Table: diff --git a/hledger-api/doc/hledger-api.1.txt b/hledger-api/doc/hledger-api.1.txt index 3b8d8232b..57f52a132 100644 --- a/hledger-api/doc/hledger-api.1.txt +++ b/hledger-api/doc/hledger-api.1.txt @@ -8,7 +8,6 @@ NAME SYNOPSIS hledger-api [OPTIONS] - hledger-api --swagger hledger api -- [OPTIONS] DESCRIPTION @@ -41,64 +40,52 @@ OPTIONS Note: if invoking hledger-api as a hledger subcommand, write -- before options as shown above. + -f --file=FILE + use a different input file. For stdin, use - (default: + $LEDGER_FILE or $HOME/.hledger.journal) + -d --static-dir=DIR serve files from a different directory (default: .) + --host=IPADDR + listen on this IP address (default: 127.0.0.1) + -p --port=PORT - use a different TCP port (default: 8001) + listen on this TCP port (default: 8001) --swagger print API docs in Swagger 2.0 format, and exit - hledger general options: - - -h show general usage (or after COMMAND, the command's usage) - - --help show the current program's manual as plain text (or after an - add-on COMMAND, the add-on's manual) - - --man show the current program's manual with man - - --info show the current program's manual with info - --version show version - --debug[=N] - show debug output (levels 1-9, default: 1) + -h show usage - -f FILE --file=FILE - use a different input file. For stdin, use - + --help show manual as plain text - --rules-file=RULESFILE - Conversion rules file to use when reading CSV (default: - FILE.rules) + --man show manual with man - --alias=OLD=NEW - display accounts named OLD as NEW - - -I --ignore-assertions - ignore any failing balance assertions in the journal + --info show manual with info ENVIRONMENT LEDGER_FILE The journal file path when not specified with -f. Default: - ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). FILES - Reads data from one or more files in hledger journal, timeclock, time- - dot, or CSV format specified with -f, or $LEDGER_FILE, or - $HOME/.hledger.journal (on windows, perhaps + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). BUGS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -112,7 +99,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) diff --git a/hledger-ui/doc/hledger-ui.1 b/hledger-ui/doc/hledger-ui.1 index 9bdc39f4b..dd59b4d8f 100644 --- a/hledger-ui/doc/hledger-ui.1 +++ b/hledger-ui/doc/hledger-ui.1 @@ -64,42 +64,12 @@ show full account names, unindented .RS .RE .PP -hledger general options: -.TP -.B \f[C]\-h\f[] -show general usage (or after COMMAND, the command\[aq]s usage) -.RS -.RE -.TP -.B \f[C]\-\-help\f[] -show the current program\[aq]s manual as plain text (or after an add\-on -COMMAND, the add\-on\[aq]s manual) -.RS -.RE -.TP -.B \f[C]\-\-man\f[] -show the current program\[aq]s manual with man -.RS -.RE -.TP -.B \f[C]\-\-info\f[] -show the current program\[aq]s manual with info -.RS -.RE -.TP -.B \f[C]\-\-version\f[] -show version -.RS -.RE -.TP -.B \f[C]\-\-debug[=N]\f[] -show debug output (levels 1\-9, default: 1) -.RS -.RE +hledger input options: .TP .B \f[C]\-f\ FILE\ \-\-file=FILE\f[] use a different input file. -For stdin, use \- +For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or +\f[C]$HOME/.hledger.journal\f[]) .RS .RE .TP @@ -109,12 +79,22 @@ Conversion rules file to use when reading CSV (default: FILE.rules) .RE .TP .B \f[C]\-\-alias=OLD=NEW\f[] -display accounts named OLD as NEW +rename accounts named OLD to NEW +.RS +.RE +.TP +.B \f[C]\-\-anon\f[] +anonymize accounts and payees +.RS +.RE +.TP +.B \f[C]\-\-pivot\ TAGNAME\f[] +use some other field/tag for account names .RS .RE .TP .B \f[C]\-I\ \-\-ignore\-assertions\f[] -ignore any failing balance assertions in the journal +ignore any failing balance assertions .RS .RE .PP @@ -207,14 +187,37 @@ convert amounts to their market value on the report end date (using the most recent applicable market price, if any) .RS .RE +.PP +hledger help options: .TP -.B \f[C]\-\-pivot\ TAGNAME\f[] -organize reports by some tag\[aq]s value instead of by account +.B \f[C]\-h\f[] +show general usage (or after COMMAND, the command\[aq]s usage) .RS .RE .TP -.B \f[C]\-\-anon\f[] -show anonymized accounts and payees +.B \f[C]\-\-help\f[] +show the current program\[aq]s manual as plain text (or after an add\-on +COMMAND, the add\-on\[aq]s manual) +.RS +.RE +.TP +.B \f[C]\-\-man\f[] +show the current program\[aq]s manual with man +.RS +.RE +.TP +.B \f[C]\-\-info\f[] +show the current program\[aq]s manual with info +.RS +.RE +.TP +.B \f[C]\-\-version\f[] +show version +.RS +.RE +.TP +.B \f[C]\-\-debug[=N]\f[] +show debug output (levels 1\-9, default: 1) .RS .RE .SH KEYS diff --git a/hledger-ui/doc/hledger-ui.1.info b/hledger-ui/doc/hledger-ui.1.info index b2a898818..f78bd664a 100644 --- a/hledger-ui/doc/hledger-ui.1.info +++ b/hledger-ui/doc/hledger-ui.1.info @@ -52,39 +52,27 @@ the data. show full account names, unindented - hledger general options: + hledger input options: -'-h' - - show general usage (or after COMMAND, the command's usage) -'--help' - - show the current program's manual as plain text (or after an add-on - COMMAND, the add-on's manual) -'--man' - - show the current program's manual with man -'--info' - - show the current program's manual with info -'--version' - - show version -'--debug[=N]' - - show debug output (levels 1-9, default: 1) '-f FILE --file=FILE' - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + '$LEDGER_FILE' or '$HOME/.hledger.journal') '--rules-file=RULESFILE' Conversion rules file to use when reading CSV (default: FILE.rules) '--alias=OLD=NEW' - display accounts named OLD as NEW + rename accounts named OLD to NEW +'--anon' + + anonymize accounts and payees +'--pivot TAGNAME' + + use some other field/tag for account names '-I --ignore-assertions' - ignore any failing balance assertions in the journal + ignore any failing balance assertions hledger reporting options: @@ -142,12 +130,28 @@ the data. convert amounts to their market value on the report end date (using the most recent applicable market price, if any) -'--pivot TAGNAME' - organize reports by some tag's value instead of by account -'--anon' + hledger help options: - show anonymized accounts and payees +'-h' + + show general usage (or after COMMAND, the command's usage) +'--help' + + show the current program's manual as plain text (or after an add-on + COMMAND, the add-on's manual) +'--man' + + show the current program's manual with man +'--info' + + show the current program's manual with info +'--version' + + show version +'--debug[=N]' + + show debug output (levels 1-9, default: 1)  File: hledger-ui.1.info, Node: KEYS, Next: SCREENS, Prev: OPTIONS, Up: Top @@ -353,17 +357,17 @@ Tag Table: Node: Top73 Node: OPTIONS825 Ref: #options924 -Node: KEYS3631 -Ref: #keys3728 -Node: SCREENS6316 -Ref: #screens6403 -Node: Accounts screen6493 -Ref: #accounts-screen6623 -Node: Register screen8672 -Ref: #register-screen8829 -Node: Transaction screen10718 -Ref: #transaction-screen10878 -Node: Error screen11748 -Ref: #error-screen11872 +Node: KEYS3677 +Ref: #keys3774 +Node: SCREENS6362 +Ref: #screens6449 +Node: Accounts screen6539 +Ref: #accounts-screen6669 +Node: Register screen8718 +Ref: #register-screen8875 +Node: Transaction screen10764 +Ref: #transaction-screen10924 +Node: Error screen11794 +Ref: #error-screen11918  End Tag Table diff --git a/hledger-ui/doc/hledger-ui.1.txt b/hledger-ui/doc/hledger-ui.1.txt index 1be1bb5a6..b54020a56 100644 --- a/hledger-ui/doc/hledger-ui.1.txt +++ b/hledger-ui/doc/hledger-ui.1.txt @@ -50,35 +50,26 @@ OPTIONS --flat show full account names, unindented - hledger general options: - - -h show general usage (or after COMMAND, the command's usage) - - --help show the current program's manual as plain text (or after an - add-on COMMAND, the add-on's manual) - - --man show the current program's manual with man - - --info show the current program's manual with info - - --version - show version - - --debug[=N] - show debug output (levels 1-9, default: 1) + hledger input options: -f FILE --file=FILE - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + $LEDGER_FILE or $HOME/.hledger.journal) --rules-file=RULESFILE Conversion rules file to use when reading CSV (default: FILE.rules) --alias=OLD=NEW - display accounts named OLD as NEW + rename accounts named OLD to NEW + + --anon anonymize accounts and payees + + --pivot TAGNAME + use some other field/tag for account names -I --ignore-assertions - ignore any failing balance assertions in the journal + ignore any failing balance assertions hledger reporting options: @@ -136,57 +127,69 @@ OPTIONS convert amounts to their market value on the report end date (using the most recent applicable market price, if any) - --pivot TAGNAME - organize reports by some tag's value instead of by account + hledger help options: - --anon show anonymized accounts and payees + -h show general usage (or after COMMAND, the command's usage) + + --help show the current program's manual as plain text (or after an + add-on COMMAND, the add-on's manual) + + --man show the current program's manual with man + + --info show the current program's manual with info + + --version + show version + + --debug[=N] + show debug output (levels 1-9, default: 1) KEYS - ? shows a help dialog listing all keys. (Some of these also appear in + ? shows a help dialog listing all keys. (Some of these also appear in the quick help at the bottom of each screen.) Press ? again (or ESCAPE, or LEFT) to close it. The following keys work on most screens: The cursor keys navigate: right (or enter) goes deeper, left returns to - the previous screen, up/down/page up/page down/home/end move up and + the previous screen, up/down/page up/page down/home/end move up and down through lists. Vi-style h/j/k/l movement keys are also supported. - A tip: movement speed is limited by your keyboard repeat rate, to move - faster you may want to adjust it. (If you're on a mac, the Karabiner + A tip: movement speed is limited by your keyboard repeat rate, to move + faster you may want to adjust it. (If you're on a mac, the Karabiner app is one way to do that.) - With shift pressed, the cursor keys adjust the report period, limiting - the transactions to be shown (by default, all are shown). - shift-down/up steps downward and upward through these standard report + With shift pressed, the cursor keys adjust the report period, limiting + the transactions to be shown (by default, all are shown). + shift-down/up steps downward and upward through these standard report period durations: year, quarter, month, week, day. Then, - shift-left/right moves to the previous/next period. t sets the report - period to today. With the --watch option, when viewing a "current" - period (the current day, week, month, quarter, or year), the period - will move automatically to track the current date. To set a non-stan- + shift-left/right moves to the previous/next period. t sets the report + period to today. With the --watch option, when viewing a "current" + period (the current day, week, month, quarter, or year), the period + will move automatically to track the current date. To set a non-stan- dard period, you can use / and a date: query. - / lets you set a general filter query limiting the data shown, using - the same query terms as in hledger and hledger-web. While editing the - query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set + / lets you set a general filter query limiting the data shown, using + the same query terms as in hledger and hledger-web. While editing the + query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set it, or ESCAPEto cancel. There are also keys for quickly adjusting some - common filters like account depth and cleared/uncleared (see below). + common filters like account depth and cleared/uncleared (see below). BACKSPACE or DELETE removes all filters, showing all transactions. - ESCAPE removes all filters and jumps back to the top screen. Or, it + ESCAPE removes all filters and jumps back to the top screen. Or, it cancels a minibuffer edit or help dialog in progress. - g reloads from the data file(s) and updates the current screen and any - previous screens. (With large files, this could cause a noticeable + g reloads from the data file(s) and updates the current screen and any + previous screens. (With large files, this could cause a noticeable pause.) - I toggles balance assertion checking. Disabling balance assertions + I toggles balance assertion checking. Disabling balance assertions temporarily can be useful for troubleshooting. - a runs command-line hledger's add command, and reloads the updated + a runs command-line hledger's add command, and reloads the updated file. This allows some basic data entry. - E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emac- + E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emac- sclient -a "" -nw) on the journal file. With some editors (emacs, vi), - the cursor will be positioned at the current transaction when invoked - from the register and transaction screens, and at the error location + the cursor will be positioned at the current transaction when invoked + from the register and transaction screens, and at the error location (if possible) when invoked from the error screen. q quits the application. @@ -195,42 +198,42 @@ KEYS SCREENS Accounts screen - This is normally the first screen displayed. It lists accounts and - their balances, like hledger's balance command. By default, it shows - all accounts and their latest ending balances (including the balances - of subaccounts). if you specify a query on the command line, it shows + This is normally the first screen displayed. It lists accounts and + their balances, like hledger's balance command. By default, it shows + all accounts and their latest ending balances (including the balances + of subaccounts). if you specify a query on the command line, it shows just the matched accounts and the balances from matched transactions. - Account names are normally indented to show the hierarchy (tree mode). + Account names are normally indented to show the hierarchy (tree mode). To see less detail, set a depth limit by pressing a number key, 1 to 9. 0 shows even less detail, collapsing all accounts to a single total. - - and + (or =) decrease and increase the depth limit. To remove the - depth limit, set it higher than the maximum account depth, or press + and + (or =) decrease and increase the depth limit. To remove the + depth limit, set it higher than the maximum account depth, or press ESCAPE. - F toggles flat mode, in which accounts are shown as a flat list, with - their full names. In this mode, account balances exclude subaccounts, - except for accounts at the depth limit (as with hledger's balance com- + F toggles flat mode, in which accounts are shown as a flat list, with + their full names. In this mode, account balances exclude subaccounts, + except for accounts at the depth limit (as with hledger's balance com- mand). H toggles between showing historical balances or period balances. His- - torical balances (the default) are ending balances at the end of the - report period, taking into account all transactions before that date - (filtered by the filter query if any), including transactions before - the start of the report period. In other words, historical balances - are what you would see on a bank statement for that account (unless - disturbed by a filter query). Period balances ignore transactions + torical balances (the default) are ending balances at the end of the + report period, taking into account all transactions before that date + (filtered by the filter query if any), including transactions before + the start of the report period. In other words, historical balances + are what you would see on a bank statement for that account (unless + disturbed by a filter query). Period balances ignore transactions before the report start date, so they show the change in balance during the report period. They are more useful eg when viewing a time log. - C toggles cleared mode, in which uncleared transactions and postings - are not shown. U toggles uncleared mode, in which only uncleared + C toggles cleared mode, in which uncleared transactions and postings + are not shown. U toggles uncleared mode, in which only uncleared transactions/postings are shown. R toggles real mode, in which virtual postings are ignored. - Z toggles nonzero mode, in which only accounts with nonzero balances - are shown (hledger-ui shows zero items by default, unlike command-line + Z toggles nonzero mode, in which only accounts with nonzero balances + are shown (hledger-ui shows zero items by default, unlike command-line hledger). Press right or enter to view an account's transactions register. @@ -239,62 +242,62 @@ SCREENS This screen shows the transactions affecting a particular account, like a check register. Each line represents one transaction and shows: - o the other account(s) involved, in abbreviated form. (If there are - both real and virtual postings, it shows only the accounts affected + o the other account(s) involved, in abbreviated form. (If there are + both real and virtual postings, it shows only the accounts affected by real postings.) - o the overall change to the current account's balance; positive for an + o the overall change to the current account's balance; positive for an inflow to this account, negative for an outflow. o the running historical total or period total for the current account, - after the transaction. This can be toggled with H. Similar to the - accounts screen, the historical total is affected by transactions - (filtered by the filter query) before the report start date, while + after the transaction. This can be toggled with H. Similar to the + accounts screen, the historical total is affected by transactions + (filtered by the filter query) before the report start date, while the period total is not. If the historical total is not disturbed by - a filter query, it will be the running historical balance you would + a filter query, it will be the running historical balance you would see on a bank register for the current account. - If the accounts screen was in tree mode, the register screen will + If the accounts screen was in tree mode, the register screen will include transactions from both the current account and its subaccounts. - If the accounts screen was in flat mode, and a non-depth-clipped - account was selected, the register screen will exclude transactions + If the accounts screen was in flat mode, and a non-depth-clipped + account was selected, the register screen will exclude transactions from subaccounts. In other words, the register always shows the trans- - actions responsible for the period balance shown on the accounts + actions responsible for the period balance shown on the accounts screen. As on the accounts screen, this can be toggled with F. - C toggles cleared mode, in which uncleared transactions and postings - are not shown. U toggles uncleared mode, in which only uncleared + C toggles cleared mode, in which uncleared transactions and postings + are not shown. U toggles uncleared mode, in which only uncleared transactions/postings are shown. R toggles real mode, in which virtual postings are ignored. - Z toggles nonzero mode, in which only transactions posting a nonzero - change are shown (hledger-ui shows zero items by default, unlike com- + Z toggles nonzero mode, in which only transactions posting a nonzero + change are shown (hledger-ui shows zero items by default, unlike com- mand-line hledger). Press right (or enter) to view the selected transaction in detail. Transaction screen - This screen shows a single transaction, as a general journal entry, - similar to hledger's print command and journal format (hledger_jour- + This screen shows a single transaction, as a general journal entry, + similar to hledger's print command and journal format (hledger_jour- nal(5)). - The transaction's date(s) and any cleared flag, transaction code, - description, comments, along with all of its account postings are - shown. Simple transactions have two postings, but there can be more + The transaction's date(s) and any cleared flag, transaction code, + description, comments, along with all of its account postings are + shown. Simple transactions have two postings, but there can be more (or in certain cases, fewer). - up and down will step through all transactions listed in the previous - account register screen. In the title bar, the numbers in parentheses - show your position within that account register. They will vary + up and down will step through all transactions listed in the previous + account register screen. In the title bar, the numbers in parentheses + show your position within that account register. They will vary depending on which account register you came from (remember most trans- actions appear in multiple account registers). The #N number preceding them is the transaction's position within the complete unfiltered jour- nal, which is a more stable id (at least until the next reload). Error screen - This screen will appear if there is a problem, such as a parse error, - when you press g to reload. Once you have fixed the problem, press g + This screen will appear if there is a problem, such as a parse error, + when you press g to reload. Once you have fixed the problem, press g again to reload and resume normal operation. (Or, you can press escape to cancel the reload attempt.) @@ -302,17 +305,17 @@ ENVIRONMENT COLUMNS The screen width to use. Default: the full terminal width. LEDGER_FILE The journal file path when not specified with -f. Default: - ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). FILES - Reads data from one or more files in hledger journal, timeclock, time- - dot, or CSV format specified with -f, or $LEDGER_FILE, or - $HOME/.hledger.journal (on windows, perhaps + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). BUGS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. -f- doesn't work (hledger-ui can't read from stdin). @@ -320,13 +323,13 @@ BUGS -V affects only the accounts screen. When you press g, the current and all previous screens are regenerated, - which may cause a noticeable pause with large files. Also there is no + which may cause a noticeable pause with large files. Also there is no visual indication that this is in progress. - --watch is not yet fully robust. It works well for normal usage, but - many file changes in a short time (eg saving the file thousands of - times with an editor macro) can cause problems at least on OSX. Symp- - toms include: unresponsive UI, periodic resetting of the cursor posi- + --watch is not yet fully robust. It works well for normal usage, but + many file changes in a short time (eg saving the file thousands of + times with an editor macro) can cause problems at least on OSX. Symp- + toms include: unresponsive UI, periodic resetting of the cursor posi- tion, momentary display of parse errors, high CPU usage eventually sub- siding, and possibly a small but persistent build-up of CPU usage until the program is restarted. @@ -334,7 +337,7 @@ BUGS REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -348,7 +351,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) diff --git a/hledger-web/doc/hledger-web.1 b/hledger-web/doc/hledger-web.1 index b998a64b8..95ea241c9 100644 --- a/hledger-web/doc/hledger-web.1 +++ b/hledger-web/doc/hledger-web.1 @@ -120,42 +120,12 @@ with this. .RS .RE .PP -hledger general options: -.TP -.B \f[C]\-h\f[] -show general usage (or after COMMAND, the command\[aq]s usage) -.RS -.RE -.TP -.B \f[C]\-\-help\f[] -show the current program\[aq]s manual as plain text (or after an add\-on -COMMAND, the add\-on\[aq]s manual) -.RS -.RE -.TP -.B \f[C]\-\-man\f[] -show the current program\[aq]s manual with man -.RS -.RE -.TP -.B \f[C]\-\-info\f[] -show the current program\[aq]s manual with info -.RS -.RE -.TP -.B \f[C]\-\-version\f[] -show version -.RS -.RE -.TP -.B \f[C]\-\-debug[=N]\f[] -show debug output (levels 1\-9, default: 1) -.RS -.RE +hledger input options: .TP .B \f[C]\-f\ FILE\ \-\-file=FILE\f[] use a different input file. -For stdin, use \- +For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or +\f[C]$HOME/.hledger.journal\f[]) .RS .RE .TP @@ -165,12 +135,22 @@ Conversion rules file to use when reading CSV (default: FILE.rules) .RE .TP .B \f[C]\-\-alias=OLD=NEW\f[] -display accounts named OLD as NEW +rename accounts named OLD to NEW +.RS +.RE +.TP +.B \f[C]\-\-anon\f[] +anonymize accounts and payees +.RS +.RE +.TP +.B \f[C]\-\-pivot\ TAGNAME\f[] +use some other field/tag for account names .RS .RE .TP .B \f[C]\-I\ \-\-ignore\-assertions\f[] -ignore any failing balance assertions in the journal +ignore any failing balance assertions .RS .RE .PP @@ -263,14 +243,37 @@ convert amounts to their market value on the report end date (using the most recent applicable market price, if any) .RS .RE +.PP +hledger help options: .TP -.B \f[C]\-\-pivot\ TAGNAME\f[] -organize reports by some tag\[aq]s value instead of by account +.B \f[C]\-h\f[] +show general usage (or after COMMAND, the command\[aq]s usage) .RS .RE .TP -.B \f[C]\-\-anon\f[] -show anonymized accounts and payees +.B \f[C]\-\-help\f[] +show the current program\[aq]s manual as plain text (or after an add\-on +COMMAND, the add\-on\[aq]s manual) +.RS +.RE +.TP +.B \f[C]\-\-man\f[] +show the current program\[aq]s manual with man +.RS +.RE +.TP +.B \f[C]\-\-info\f[] +show the current program\[aq]s manual with info +.RS +.RE +.TP +.B \f[C]\-\-version\f[] +show version +.RS +.RE +.TP +.B \f[C]\-\-debug[=N]\f[] +show debug output (levels 1\-9, default: 1) .RS .RE .SH ENVIRONMENT diff --git a/hledger-web/doc/hledger-web.1.info b/hledger-web/doc/hledger-web.1.info index fdd9f4e1d..4aaecdc65 100644 --- a/hledger-web/doc/hledger-web.1.info +++ b/hledger-web/doc/hledger-web.1.info @@ -97,39 +97,27 @@ options as shown above. them from another server for efficiency, you would set the url with this. - hledger general options: + hledger input options: -'-h' - - show general usage (or after COMMAND, the command's usage) -'--help' - - show the current program's manual as plain text (or after an add-on - COMMAND, the add-on's manual) -'--man' - - show the current program's manual with man -'--info' - - show the current program's manual with info -'--version' - - show version -'--debug[=N]' - - show debug output (levels 1-9, default: 1) '-f FILE --file=FILE' - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + '$LEDGER_FILE' or '$HOME/.hledger.journal') '--rules-file=RULESFILE' Conversion rules file to use when reading CSV (default: FILE.rules) '--alias=OLD=NEW' - display accounts named OLD as NEW + rename accounts named OLD to NEW +'--anon' + + anonymize accounts and payees +'--pivot TAGNAME' + + use some other field/tag for account names '-I --ignore-assertions' - ignore any failing balance assertions in the journal + ignore any failing balance assertions hledger reporting options: @@ -187,12 +175,28 @@ options as shown above. convert amounts to their market value on the report end date (using the most recent applicable market price, if any) -'--pivot TAGNAME' - organize reports by some tag's value instead of by account -'--anon' + hledger help options: - show anonymized accounts and payees +'-h' + + show general usage (or after COMMAND, the command's usage) +'--help' + + show the current program's manual as plain text (or after an add-on + COMMAND, the add-on's manual) +'--man' + + show the current program's manual with man +'--info' + + show the current program's manual with info +'--version' + + show version +'--debug[=N]' + + show debug output (levels 1-9, default: 1)  Tag Table: diff --git a/hledger-web/doc/hledger-web.1.txt b/hledger-web/doc/hledger-web.1.txt index 3e8a73793..4e0242c7c 100644 --- a/hledger-web/doc/hledger-web.1.txt +++ b/hledger-web/doc/hledger-web.1.txt @@ -95,35 +95,26 @@ OPTIONS them from another server for efficiency, you would set the url with this. - hledger general options: - - -h show general usage (or after COMMAND, the command's usage) - - --help show the current program's manual as plain text (or after an - add-on COMMAND, the add-on's manual) - - --man show the current program's manual with man - - --info show the current program's manual with info - - --version - show version - - --debug[=N] - show debug output (levels 1-9, default: 1) + hledger input options: -f FILE --file=FILE - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + $LEDGER_FILE or $HOME/.hledger.journal) --rules-file=RULESFILE Conversion rules file to use when reading CSV (default: FILE.rules) --alias=OLD=NEW - display accounts named OLD as NEW + rename accounts named OLD to NEW + + --anon anonymize accounts and payees + + --pivot TAGNAME + use some other field/tag for account names -I --ignore-assertions - ignore any failing balance assertions in the journal + ignore any failing balance assertions hledger reporting options: @@ -181,24 +172,36 @@ OPTIONS convert amounts to their market value on the report end date (using the most recent applicable market price, if any) - --pivot TAGNAME - organize reports by some tag's value instead of by account + hledger help options: - --anon show anonymized accounts and payees + -h show general usage (or after COMMAND, the command's usage) + + --help show the current program's manual as plain text (or after an + add-on COMMAND, the add-on's manual) + + --man show the current program's manual with man + + --info show the current program's manual with info + + --version + show version + + --debug[=N] + show debug output (levels 1-9, default: 1) ENVIRONMENT LEDGER_FILE The journal file path when not specified with -f. Default: - ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). FILES - Reads data from one or more files in hledger journal, timeclock, time- - dot, or CSV format specified with -f, or $LEDGER_FILE, or - $HOME/.hledger.journal (on windows, perhaps + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). BUGS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. -f- doesn't work (hledger-web can't read from stdin). @@ -212,7 +215,7 @@ BUGS REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -226,7 +229,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) diff --git a/hledger/doc/hledger.1 b/hledger/doc/hledger.1 index 6b5cd2a05..c12b6814a 100644 --- a/hledger/doc/hledger.1 +++ b/hledger/doc/hledger.1 @@ -149,76 +149,60 @@ $\ hledger\ activity\ \-W\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ show\ tran .fi .SH OPTIONS .PP -To see general usage and the command list: \f[C]hledger\ \-h\f[] or just -\f[C]hledger\f[]. -To see usage for a specific command: \f[C]hledger\ COMMAND\ \-h\f[]. +To see general usage help, including general options which are supported +by most hledger commands, run \f[C]hledger\ \-h\f[]. +(Note \-h and \-\-help are different, like git.) These options can +appear anywhere on the command line, and are listed below. .PP -hledger has several kinds of options: -.IP \[bu] 2 -General options are always available and can appear anywhere on the -command line. -\f[C]hledger\ \-h\f[] shows these. -Eg: \f[C]hledger\ \-\-version\f[]. -.IP \[bu] 2 -Common reporting options are available with most commands. -These and all other non\-general options must be written after COMMAND. -\f[C]hledger\ COMMAND\ \-h\f[] shows these. -Eg: \f[C]hledger\ register\ \-\-cleared\f[]. -.IP \[bu] 2 -Command\-specific options are also provided by some commands. -\f[C]hledger\ COMMAND\ \-h\f[] shows these too. -Eg: \f[C]hledger\ register\ \-\-average\f[]. -.IP \[bu] 2 -Some hledger commands come from separate add\-on executables, which have -their own options. -\f[C]hledger\ COMMAND\ \-h\f[] shows these, as usual. -Such options, if not also supported by hledger, should be written -following a double hyphen argument (\f[C]\-\-\f[]) so that hledger\[aq]s -option parser does not complain. -Eg: \f[C]hledger\ ui\ \-\-\ \-\-register=checking\f[]. -Or, you can just run the add\-on directly: -\f[C]hledger\-ui\ \-\-register=checking\f[]. +To see usage for a specific command, run: +\f[C]hledger\ COMMAND\ \-h\f[]. +Command\-specific options must be written after the command name, eg: +\f[C]hledger\ print\ \-x\f[]. .PP -Command arguments may also follow the command name. -In most cases these specify a query which filters the data. -Command options and arguments can be intermixed. +Additionally, if the command is an add\-on, you may need to put its +options after a double\-hyphen, eg: +\f[C]hledger\ ui\ \-\-\ \-\-watch\f[]. +Or, you can run the add\-on executable directly, eg: +\f[C]hledger\-ui\ \-\-watch\f[]. .PP -Option and argument values containing problematic characters should be -escaped with double quotes, backslashes, or (best) single quotes. -This means spaces, but also characters which are significant to your -command shell, such as less\-than/greater\-than. +Most commands also accept arguments, which are often a query filtering +the data in some way. +.SS Special characters +.PP +Option and argument values which contain problematic characters should +be escaped with double quotes, backslashes, or (best) single quotes. +Problematic characters means spaces, and also characters which are +significant to your command shell, such as less\-than/greater\-than. Eg: \f[C]hledger\ register\ \-p\ \[aq]last\ year\[aq]\ "accounts\ receivable\ (receivable|payable)"\ amt:\\>100\f[]. .PP -Characters which are significant to the shell and also in regular -expressions, like parentheses, the pipe symbol and the dollar sign, must -sometimes be double\-escaped. -Eg, to match the dollar symbol: +Characters which are significant both to the shell and in regular +expressions sometimes need to be double\-escaped. +These include parentheses, the pipe symbol and the dollar sign. +Eg, to match the dollar symbol, bash users should do: \f[C]hledger\ balance\ cur:\[aq]\\$\[aq]\f[] or \f[C]hledger\ balance\ cur:\\\\$\f[]. .PP There\[aq]s more.. -options and arguments being passed by hledger to an add\-on executable -get de\-escaped once in the process. -In this case you might need triple\-escaping. +options and arguments get de\-escaped when hledger is passing them to an +addon executable. +In this case you might need \f[I]triple\f[]\-escaping. Eg: \f[C]hledger\ ui\ cur:\[aq]\\\\$\[aq]\f[] or \f[C]hledger\ ui\ cur:\\\\\\\\$\f[]. .PP If in doubt, keep things simple: .IP \[bu] 2 +run add\-on executables directly +.IP \[bu] 2 write options after the command .IP \[bu] 2 enclose problematic args in single quotes .IP \[bu] 2 if needed, also add a backslash to escape regexp metacharacters -.IP \[bu] 2 -run add\-on executables directly .PP -If you\[aq]re really curious, add \f[C]\-\-debug=2\f[] for -troubleshooting. +If you\[aq]re really stumped, add \f[C]\-\-debug=2\f[] to troubleshoot. .SS General options -.PP -Always available, can be written before or after COMMAND. +.SS General help options .TP .B \f[C]\-h\f[] show general usage (or after COMMAND, the command\[aq]s usage) @@ -250,10 +234,12 @@ show version show debug output (levels 1\-9, default: 1) .RS .RE +.SS General input options .TP .B \f[C]\-f\ FILE\ \-\-file=FILE\f[] use a different input file. -For stdin, use \- +For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or +\f[C]$HOME/.hledger.journal\f[]) .RS .RE .TP @@ -263,17 +249,25 @@ Conversion rules file to use when reading CSV (default: FILE.rules) .RE .TP .B \f[C]\-\-alias=OLD=NEW\f[] -display accounts named OLD as NEW +rename accounts named OLD to NEW +.RS +.RE +.TP +.B \f[C]\-\-anon\f[] +anonymize accounts and payees +.RS +.RE +.TP +.B \f[C]\-\-pivot\ TAGNAME\f[] +use some other field/tag for account names .RS .RE .TP .B \f[C]\-I\ \-\-ignore\-assertions\f[] -ignore any failing balance assertions in the journal +ignore any failing balance assertions .RS .RE -.SS Reporting options -.PP -Common reporting options, must be written after COMMAND. +.SS General reporting options .TP .B \f[C]\-b\ \-\-begin=DATE\f[] include postings/txns on or after this date @@ -362,20 +356,12 @@ convert amounts to their market value on the report end date (using the most recent applicable market price, if any) .RS .RE -.TP -.B \f[C]\-\-pivot\ TAGNAME\f[] -organize reports by some tag\[aq]s value instead of by account -.RS -.RE -.TP -.B \f[C]\-\-anon\f[] -show anonymized accounts and payees -.RS -.RE .PP -If a reporting option occurs more than once on the command line, the -last one takes precedence. -Eg \-p jan \-p feb is equivalent to \-p feb. +Note when multiple similar reporting options are provided, the last one +takes precedence. +Eg \f[C]\-p\ feb\ \-p\ mar\f[] is equivalent to \f[C]\-p\ mar\f[]. +.PP +Some of these can also be written as queries. .SS Input files .PP hledger reads transactions from a data file (and the add command writes @@ -1290,6 +1276,11 @@ write output to FILE. A file extension matching one of the above formats selects that format. .RS .RE +.TP +.B \f[C]\-\-pretty\-tables\f[] +Use unicode to display prettier tables. +.RS +.RE .PP The balance command displays accounts and balances. It is hledger\[aq]s most featureful and most useful command. diff --git a/hledger/doc/hledger.1.info b/hledger/doc/hledger.1.info index d69f13e44..3d1e01452 100644 --- a/hledger/doc/hledger.1.info +++ b/hledger/doc/hledger.1.info @@ -114,63 +114,25 @@ File: hledger.1.info, Node: OPTIONS, Next: QUERIES, Prev: EXAMPLES, Up: Top 2 OPTIONS ********* -To see general usage and the command list: 'hledger -h' or just -'hledger'. To see usage for a specific command: 'hledger COMMAND -h'. +To see general usage help, including general options which are supported +by most hledger commands, run 'hledger -h'. (Note -h and -help are +different, like git.) These options can appear anywhere on the command +line, and are listed below. - hledger has several kinds of options: + To see usage for a specific command, run: 'hledger COMMAND -h'. +Command-specific options must be written after the command name, eg: +'hledger print -x'. - * General options are always available and can appear anywhere on the - command line. 'hledger -h' shows these. Eg: 'hledger --version'. + Additionally, if the command is an add-on, you may need to put its +options after a double-hyphen, eg: 'hledger ui -- --watch'. Or, you can +run the add-on executable directly, eg: 'hledger-ui --watch'. - * Common reporting options are available with most commands. These - and all other non-general options must be written after COMMAND. - 'hledger COMMAND -h' shows these. Eg: 'hledger register - --cleared'. - - * Command-specific options are also provided by some commands. - 'hledger COMMAND -h' shows these too. Eg: 'hledger register - --average'. - - * Some hledger commands come from separate add-on executables, which - have their own options. 'hledger COMMAND -h' shows these, as - usual. Such options, if not also supported by hledger, should be - written following a double hyphen argument ('--') so that hledger's - option parser does not complain. Eg: 'hledger ui -- - --register=checking'. Or, you can just run the add-on directly: - 'hledger-ui --register=checking'. - - Command arguments may also follow the command name. In most cases -these specify a query which filters the data. Command options and -arguments can be intermixed. - - Option and argument values containing problematic characters should -be escaped with double quotes, backslashes, or (best) single quotes. -This means spaces, but also characters which are significant to your -command shell, such as less-than/greater-than. Eg: 'hledger register -p -'last year' "accounts receivable (receivable|payable)" amt:\>100'. - - Characters which are significant to the shell and also in regular -expressions, like parentheses, the pipe symbol and the dollar sign, must -sometimes be double-escaped. Eg, to match the dollar symbol: 'hledger -balance cur:'\$'' or 'hledger balance cur:\\$'. - - There's more.. options and arguments being passed by hledger to an -add-on executable get de-escaped once in the process. In this case you -might need triple-escaping. Eg: 'hledger ui cur:'\\$'' or 'hledger ui -cur:\\\\$'. - - If in doubt, keep things simple: - - * write options after the command - * enclose problematic args in single quotes - * if needed, also add a backslash to escape regexp metacharacters - * run add-on executables directly - - If you're really curious, add '--debug=2' for troubleshooting. + Most commands also accept arguments, which are often a query +filtering the data in some way. * Menu: +* Special characters:: * General options:: -* Reporting options:: * Input files:: * Smart dates:: * Report start & end date:: @@ -181,12 +143,55 @@ cur:\\\\$'. * Regular expressions::  -File: hledger.1.info, Node: General options, Next: Reporting options, Up: OPTIONS +File: hledger.1.info, Node: Special characters, Next: General options, Up: OPTIONS -2.1 General options +2.1 Special characters +====================== + +Option and argument values which contain problematic characters should +be escaped with double quotes, backslashes, or (best) single quotes. +Problematic characters means spaces, and also characters which are +significant to your command shell, such as less-than/greater-than. Eg: +'hledger register -p 'last year' "accounts receivable +(receivable|payable)" amt:\>100'. + + Characters which are significant both to the shell and in regular +expressions sometimes need to be double-escaped. These include +parentheses, the pipe symbol and the dollar sign. Eg, to match the +dollar symbol, bash users should do: 'hledger balance cur:'\$'' or +'hledger balance cur:\\$'. + + There's more.. options and arguments get de-escaped when hledger is +passing them to an addon executable. In this case you might need +_triple_-escaping. Eg: 'hledger ui cur:'\\$'' or 'hledger ui +cur:\\\\$'. + + If in doubt, keep things simple: + + * run add-on executables directly + * write options after the command + * enclose problematic args in single quotes + * if needed, also add a backslash to escape regexp metacharacters + + If you're really stumped, add '--debug=2' to troubleshoot. + + +File: hledger.1.info, Node: General options, Next: Input files, Prev: Special characters, Up: OPTIONS + +2.2 General options =================== -Always available, can be written before or after COMMAND. +* Menu: + +* General help options:: +* General input options:: +* General reporting options:: + + +File: hledger.1.info, Node: General help options, Next: General input options, Up: General options + +2.2.1 General help options +-------------------------- '-h' @@ -207,26 +212,38 @@ Always available, can be written before or after COMMAND. '--debug[=N]' show debug output (levels 1-9, default: 1) + + +File: hledger.1.info, Node: General input options, Next: General reporting options, Prev: General help options, Up: General options + +2.2.2 General input options +--------------------------- + '-f FILE --file=FILE' - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + '$LEDGER_FILE' or '$HOME/.hledger.journal') '--rules-file=RULESFILE' Conversion rules file to use when reading CSV (default: FILE.rules) '--alias=OLD=NEW' - display accounts named OLD as NEW + rename accounts named OLD to NEW +'--anon' + + anonymize accounts and payees +'--pivot TAGNAME' + + use some other field/tag for account names '-I --ignore-assertions' - ignore any failing balance assertions in the journal + ignore any failing balance assertions  -File: hledger.1.info, Node: Reporting options, Next: Input files, Prev: General options, Up: OPTIONS +File: hledger.1.info, Node: General reporting options, Prev: General input options, Up: General options -2.2 Reporting options -===================== - -Common reporting options, must be written after COMMAND. +2.2.3 General reporting options +------------------------------- '-b --begin=DATE' @@ -282,18 +299,14 @@ Common reporting options, must be written after COMMAND. convert amounts to their market value on the report end date (using the most recent applicable market price, if any) -'--pivot TAGNAME' - organize reports by some tag's value instead of by account -'--anon' + Note when multiple similar reporting options are provided, the last +one takes precedence. Eg '-p feb -p mar' is equivalent to '-p mar'. - show anonymized accounts and payees - - If a reporting option occurs more than once on the command line, the -last one takes precedence. Eg -p jan -p feb is equivalent to -p feb. + Some of these can also be written as queries.  -File: hledger.1.info, Node: Input files, Next: Smart dates, Prev: Reporting options, Up: OPTIONS +File: hledger.1.info, Node: Input files, Next: Smart dates, Prev: General options, Up: OPTIONS 2.3 Input files =============== @@ -941,6 +954,9 @@ Show accounts and their balances. Alias: bal. write output to FILE. A file extension matching one of the above formats selects that format. +'--pretty-tables' + + Use unicode to display prettier tables. The balance command displays accounts and balances. It is hledger's most featureful and most useful command. @@ -2192,123 +2208,129 @@ Node: EXAMPLES1883 Ref: #examples1985 Node: OPTIONS3631 Ref: #options3735 -Node: General options6393 -Ref: #general-options6522 -Node: Reporting options7295 -Ref: #reporting-options7448 -Node: Input files9024 -Ref: #input-files9161 -Node: Smart dates11124 -Ref: #smart-dates11267 -Node: Report start & end date12246 -Ref: #report-start-end-date12418 -Node: Report intervals13484 -Ref: #report-intervals13649 -Node: Period expressions14050 -Ref: #period-expressions14210 -Node: Depth limiting16550 -Ref: #depth-limiting16694 -Node: Pivoting16895 -Ref: #pivoting17028 -Node: Regular expressions18857 -Ref: #regular-expressions18991 -Node: QUERIES20469 -Ref: #queries20573 -Node: COMMANDS24219 -Ref: #commands24333 -Node: accounts25006 -Ref: #accounts25106 -Node: activity26088 -Ref: #activity26200 -Node: add26559 -Ref: #add26660 -Node: balance29318 -Ref: #balance29431 -Node: Flat mode32309 -Ref: #flat-mode32436 -Node: Depth limited balance reports32856 -Ref: #depth-limited-balance-reports33059 -Node: Multicolumn balance reports33479 -Ref: #multicolumn-balance-reports33681 -Node: Market value38329 -Ref: #market-value38493 -Node: Custom balance output39793 -Ref: #custom-balance-output39966 -Node: Output destination42059 -Ref: #output-destination42224 -Node: CSV output42494 -Ref: #csv-output42613 -Node: balancesheet43010 -Ref: #balancesheet43138 -Node: cashflow45057 -Ref: #cashflow45174 -Node: help47072 -Ref: #help47184 -Node: incomestatement48022 -Ref: #incomestatement48152 -Node: info50067 -Ref: #info50174 -Node: man50538 -Ref: #man50635 -Node: print51040 -Ref: #print51145 -Node: register54901 -Ref: #register55014 -Node: Custom register output59510 -Ref: #custom-register-output59641 -Node: stats60938 -Ref: #stats61044 -Node: test61925 -Ref: #test62012 -Node: ADD-ON COMMANDS62380 -Ref: #add-on-commands62516 -Node: Official add-ons63803 -Ref: #official-add-ons63945 -Node: api64032 -Ref: #api64123 -Node: ui64175 -Ref: #ui64276 -Node: web64334 -Ref: #web64425 -Node: Third party add-ons64471 -Ref: #third-party-add-ons64648 -Node: diff64783 -Ref: #diff64882 -Node: iadd64981 -Ref: #iadd65097 -Node: interest65180 -Ref: #interest65303 -Node: irr65398 -Ref: #irr65498 -Node: Experimental add-ons65576 -Ref: #experimental-add-ons65730 -Node: autosync66123 -Ref: #autosync66237 -Node: budget66476 -Ref: #budget66600 -Node: chart66666 -Ref: #chart66785 -Node: check66856 -Ref: #check66980 -Node: check-dates67047 -Ref: #check-dates67189 -Node: check-dupes67262 -Ref: #check-dupes67405 -Node: equity67482 -Ref: #equity67610 -Node: prices67729 -Ref: #prices67858 -Node: print-unique67913 -Ref: #print-unique68062 -Node: register-match68155 -Ref: #register-match68311 -Node: rewrite68409 -Ref: #rewrite68530 -Node: TROUBLESHOOTING68608 -Ref: #troubleshooting68727 -Node: Run-time problems68781 -Ref: #run-time-problems68924 -Node: Known limitations70871 -Ref: #known-limitations71014 +Node: Special characters4649 +Ref: #special-characters4785 +Node: General options5953 +Ref: #general-options6103 +Node: General help options6194 +Ref: #general-help-options6354 +Node: General input options6753 +Ref: #general-input-options6949 +Node: General reporting options7420 +Ref: #general-reporting-options7595 +Node: Input files9027 +Ref: #input-files9162 +Node: Smart dates11125 +Ref: #smart-dates11268 +Node: Report start & end date12247 +Ref: #report-start-end-date12419 +Node: Report intervals13485 +Ref: #report-intervals13650 +Node: Period expressions14051 +Ref: #period-expressions14211 +Node: Depth limiting16551 +Ref: #depth-limiting16695 +Node: Pivoting16896 +Ref: #pivoting17029 +Node: Regular expressions18858 +Ref: #regular-expressions18992 +Node: QUERIES20470 +Ref: #queries20574 +Node: COMMANDS24220 +Ref: #commands24334 +Node: accounts25007 +Ref: #accounts25107 +Node: activity26089 +Ref: #activity26201 +Node: add26560 +Ref: #add26661 +Node: balance29319 +Ref: #balance29432 +Node: Flat mode32374 +Ref: #flat-mode32501 +Node: Depth limited balance reports32921 +Ref: #depth-limited-balance-reports33124 +Node: Multicolumn balance reports33544 +Ref: #multicolumn-balance-reports33746 +Node: Market value38394 +Ref: #market-value38558 +Node: Custom balance output39858 +Ref: #custom-balance-output40031 +Node: Output destination42124 +Ref: #output-destination42289 +Node: CSV output42559 +Ref: #csv-output42678 +Node: balancesheet43075 +Ref: #balancesheet43203 +Node: cashflow45122 +Ref: #cashflow45239 +Node: help47137 +Ref: #help47249 +Node: incomestatement48087 +Ref: #incomestatement48217 +Node: info50132 +Ref: #info50239 +Node: man50603 +Ref: #man50700 +Node: print51105 +Ref: #print51210 +Node: register54966 +Ref: #register55079 +Node: Custom register output59575 +Ref: #custom-register-output59706 +Node: stats61003 +Ref: #stats61109 +Node: test61990 +Ref: #test62077 +Node: ADD-ON COMMANDS62445 +Ref: #add-on-commands62581 +Node: Official add-ons63868 +Ref: #official-add-ons64010 +Node: api64097 +Ref: #api64188 +Node: ui64240 +Ref: #ui64341 +Node: web64399 +Ref: #web64490 +Node: Third party add-ons64536 +Ref: #third-party-add-ons64713 +Node: diff64848 +Ref: #diff64947 +Node: iadd65046 +Ref: #iadd65162 +Node: interest65245 +Ref: #interest65368 +Node: irr65463 +Ref: #irr65563 +Node: Experimental add-ons65641 +Ref: #experimental-add-ons65795 +Node: autosync66188 +Ref: #autosync66302 +Node: budget66541 +Ref: #budget66665 +Node: chart66731 +Ref: #chart66850 +Node: check66921 +Ref: #check67045 +Node: check-dates67112 +Ref: #check-dates67254 +Node: check-dupes67327 +Ref: #check-dupes67470 +Node: equity67547 +Ref: #equity67675 +Node: prices67794 +Ref: #prices67923 +Node: print-unique67978 +Ref: #print-unique68127 +Node: register-match68220 +Ref: #register-match68376 +Node: rewrite68474 +Ref: #rewrite68595 +Node: TROUBLESHOOTING68673 +Ref: #troubleshooting68792 +Node: Run-time problems68846 +Ref: #run-time-problems68989 +Node: Known limitations70936 +Ref: #known-limitations71079  End Tag Table diff --git a/hledger/doc/hledger.1.txt b/hledger/doc/hledger.1.txt index f5a350519..a2c5dd186 100644 --- a/hledger/doc/hledger.1.txt +++ b/hledger/doc/hledger.1.txt @@ -108,65 +108,54 @@ EXAMPLES $ hledger activity -W # show transaction counts per week as a bar chart OPTIONS - To see general usage and the command list: hledger -h or just hledger. - To see usage for a specific command: hledger COMMAND -h. + To see general usage help, including general options which are sup- + ported by most hledger commands, run hledger -h. (Note -h and --help + are different, like git.) These options can appear anywhere on the com- + mand line, and are listed below. - hledger has several kinds of options: + To see usage for a specific command, run: hledger COMMAND -h. Com- + mand-specific options must be written after the command name, eg: + hledger print -x. - o General options are always available and can appear anywhere on the - command line. hledger -h shows these. Eg: hledger --version. + Additionally, if the command is an add-on, you may need to put its + options after a double-hyphen, eg: hledger ui -- --watch. Or, you can + run the add-on executable directly, eg: hledger-ui --watch. - o Common reporting options are available with most commands. These and - all other non-general options must be written after COMMAND. - hledger COMMAND -h shows these. Eg: hledger register --cleared. + Most commands also accept arguments, which are often a query filtering + the data in some way. - o Command-specific options are also provided by some commands. - hledger COMMAND -h shows these too. Eg: hledger register --average. - - o Some hledger commands come from separate add-on executables, which - have their own options. hledger COMMAND -h shows these, as usual. - Such options, if not also supported by hledger, should be written - following a double hyphen argument (--) so that hledger's option - parser does not complain. Eg: hledger ui -- --register=checking. - Or, you can just run the add-on directly: hledger-ui --regis- - ter=checking. - - Command arguments may also follow the command name. In most cases - these specify a query which filters the data. Command options and - arguments can be intermixed. - - Option and argument values containing problematic characters should be - escaped with double quotes, backslashes, or (best) single quotes. This - means spaces, but also characters which are significant to your command - shell, such as less-than/greater-than. Eg: hledger regis- - ter -p 'last year' "accounts receivable (receiv- + Special characters + Option and argument values which contain problematic characters should + be escaped with double quotes, backslashes, or (best) single quotes. + Problematic characters means spaces, and also characters which are sig- + nificant to your command shell, such as less-than/greater-than. Eg: + hledger register -p 'last year' "accounts receivable (receiv- able|payable)" amt:\>100. - Characters which are significant to the shell and also in regular - expressions, like parentheses, the pipe symbol and the dollar sign, - must sometimes be double-escaped. Eg, to match the dollar symbol: - hledger balance cur:'\$' or hledger balance cur:\\$. + Characters which are significant both to the shell and in regular + expressions sometimes need to be double-escaped. These include paren- + theses, the pipe symbol and the dollar sign. Eg, to match the dollar + symbol, bash users should do: hledger balance cur:'\$' or hledger bal- + ance cur:\\$. - There's more.. options and arguments being passed by hledger to an - add-on executable get de-escaped once in the process. In this case you - might need triple-escaping. Eg: hledger ui cur:'\\$' or - hledger ui cur:\\\\$. + There's more.. options and arguments get de-escaped when hledger is + passing them to an addon executable. In this case you might need + triple-escaping. Eg: hledger ui cur:'\\$' or hledger ui cur:\\\\$. If in doubt, keep things simple: + o run add-on executables directly + o write options after the command o enclose problematic args in single quotes o if needed, also add a backslash to escape regexp metacharacters - o run add-on executables directly - - If you're really curious, add --debug=2 for troubleshooting. + If you're really stumped, add --debug=2 to troubleshoot. General options - Always available, can be written before or after COMMAND. - + General help options -h show general usage (or after COMMAND, the command's usage) --help show the current program's manual as plain text (or after an @@ -182,22 +171,27 @@ OPTIONS --debug[=N] show debug output (levels 1-9, default: 1) + General input options -f FILE --file=FILE - use a different input file. For stdin, use - + use a different input file. For stdin, use - (default: + $LEDGER_FILE or $HOME/.hledger.journal) --rules-file=RULESFILE - Conversion rules file to use when reading CSV (default: + Conversion rules file to use when reading CSV (default: FILE.rules) --alias=OLD=NEW - display accounts named OLD as NEW + rename accounts named OLD to NEW + + --anon anonymize accounts and payees + + --pivot TAGNAME + use some other field/tag for account names -I --ignore-assertions - ignore any failing balance assertions in the journal - - Reporting options - Common reporting options, must be written after COMMAND. + ignore any failing balance assertions + General reporting options -b --begin=DATE include postings/txns on or after this date @@ -220,7 +214,7 @@ OPTIONS multiperiod/multicolumn report by year -p --period=PERIODEXP - set start date, end date, and/or reporting interval all at once + set start date, end date, and/or reporting interval all at once (overrides the flags above) --date2 @@ -245,25 +239,22 @@ OPTIONS show items with zero amount, normally hidden -B --cost - convert amounts to their cost at transaction time (using the + convert amounts to their cost at transaction time (using the transaction price, if any) -V --value - convert amounts to their market value on the report end date + convert amounts to their market value on the report end date (using the most recent applicable market price, if any) - --pivot TAGNAME - organize reports by some tag's value instead of by account + Note when multiple similar reporting options are provided, the last one + takes precedence. Eg -p feb -p mar is equivalent to -p mar. - --anon show anonymized accounts and payees - - If a reporting option occurs more than once on the command line, the - last one takes precedence. Eg -p jan -p feb is equivalent to -p feb. + Some of these can also be written as queries. Input files hledger reads transactions from a data file (and the add command writes to it). By default this file is $HOME/.hledger.journal (or on Windows, - something like C:/Users/USER/.hledger.journal). You can override this + something like C:/Users/USER/.hledger.journal). You can override this with the $LEDGER_FILE environment variable: $ setenv LEDGER_FILE ~/finance/2016.journal @@ -277,9 +268,9 @@ OPTIONS $ cat some.journal | hledger -f- - Usually the data file is in hledger's journal format, but it can also - be one of several other formats, listed below. hledger detects the - format automatically based on the file extension, or if that is not + Usually the data file is in hledger's journal format, but it can also + be one of several other formats, listed below. hledger detects the + format automatically based on the file extension, or if that is not recognised, by trying each built-in "reader" in turn: @@ -287,15 +278,15 @@ OPTIONS ----------------------------------------------------------------------------- journal hledger's journal format, also .journal .j .hledger some Ledger journals .ledger - timeclock timeclock files (precise time .timeclock + timeclock timeclock files (precise time .timeclock logging) - timedot timedot files (approximate time .timedot + timedot timedot files (approximate time .timedot logging) - csv comma-separated values (data .csv + csv comma-separated values (data .csv interchange) - If needed (eg to ensure correct error messages when a file has the - "wrong" extension), you can force a specific reader/format by prepend- + If needed (eg to ensure correct error messages when a file has the + "wrong" extension), you can force a specific reader/format by prepend- ing it to the file path with a colon. Examples: $ hledger -f csv:/some/csv-file.dat stats @@ -306,7 +297,7 @@ OPTIONS o directives in one file will not affect the other files - o balance assertions will not see any account balances from previous + o balance assertions will not see any account balances from previous files If you need those, either use the include directive, or concatenate the @@ -314,8 +305,8 @@ OPTIONS 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 - be relative to today's date, and can have less-significant date parts + dates in the journal file). Smart dates allow some english words, can + be relative to today's date, and can have less-significant date parts omitted (defaulting to 1). Examples: @@ -323,33 +314,31 @@ OPTIONS 2009/1/1, 2009/01/01, simple dates, several sep- 2009-1-1, 2009.1.1 arators allowed - 2009/1, 2009 same as above - a missing + 2009/1, 2009 same as above - a missing day or month defaults to 1 - 1/1, january, jan, relative dates, meaning - this year january 1 of the current + 1/1, january, jan, relative dates, meaning + this year january 1 of the current year next year january 1 of next year this month the 1st of the current month this week the most recent monday - - last week the monday of the week before this one lastweek spaces are optional today, yesterday, tomorrow 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 journal data, by default. So, the effective report start and end dates - will be the earliest and latest transaction or posting dates found in + will be the earliest and latest transaction or posting dates found in the journal. - Often you will want to see a shorter time span, such as the current - month. You can specify a start and/or end date using -b/--begin, + Often you will want to see a shorter time span, such as the current + month. You can specify a start and/or end date using -b/--begin, -e/--end, -p/--period or a date: query (described below). All of these - accept the smart date syntax. One important thing to be aware of when - specifying end dates: as in Ledger, end dates are exclusive, so you + accept the smart date syntax. One important thing to be aware of when + specifying end dates: as in Ledger, end dates are exclusive, so you need to write the date after the last day you want to include. Examples: @@ -359,10 +348,10 @@ OPTIONS day 2016 -e 12/1 end at the start of decem- ber 1st of the current - year (11/30 will be the + year (11/30 will be the last date included) - -b thismonth all transactions on or - after the 1st of the cur- + -b thismonth all transactions on or + after the 1st of the cur- rent month -p thismonth all transactions in the current month @@ -374,24 +363,24 @@ OPTIONS Report intervals A report interval can be specified so that commands like register, bal- - ance and activity will divide their reports into multiple subperiods. - The basic intervals can be selected with one of -D/--daily, - -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- - plex intervals may be specified with a period expression. Report + ance and activity will divide their reports into multiple subperiods. + The basic intervals can be selected with one of -D/--daily, + -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- + plex intervals may be specified with a period expression. Report intervals can not be specified with a query, currently. Period expressions - The -p/--period option accepts period expressions, a shorthand way of - expressing a start date, end date, and/or report interval all at once. + The -p/--period option accepts period expressions, a shorthand way of + expressing a start date, end date, and/or report interval all at once. - Here's a basic period expression specifying the first quarter of 2009. - Note, hledger always treats start dates as inclusive and end dates as + Here's a basic period expression specifying the first quarter of 2009. + Note, hledger always treats start dates as inclusive and end dates as exclusive: -p "from 2009/1/1 to 2009/4/1" - Keywords like "from" and "to" are optional, and so are the spaces, as - long as you don't run two dates together. "to" can also be written as + Keywords like "from" and "to" are optional, and so are the spaces, as + long as you don't run two dates together. "to" can also be written as "-". These are equivalent to the above: @@ -399,7 +388,7 @@ OPTIONS -p2009/1/1to2009/4/1 -p2009/1/1-2009/4/1 - Dates are smart dates, so if the current year is 2009, the above can + Dates are smart dates, so if the current year is 2009, the above can also be written as: @@ -411,29 +400,31 @@ OPTIONS earliest or latest transaction in your journal: + + -p "from 2009/1/1" everything after january 1, 2009 -p "from 2009/1" the same -p "from 2009" the same - -p "to 2009" everything before january + -p "to 2009" everything before january 1, 2009 - A single date with no "from" or "to" defines both the start and end + A single date with no "from" or "to" defines both the start and end date like so: - -p "2009" the year 2009; equivalent + -p "2009" the year 2009; equivalent to "2009/1/1 to 2010/1/1" - -p "2009/1" the month of jan; equiva- + -p "2009/1" the month of jan; equiva- lent to "2009/1/1 to 2009/2/1" - -p "2009/1/1" just that day; equivalent + -p "2009/1/1" just that day; equivalent to "2009/1/1 to 2009/1/2" - The argument of -p can also begin with, or be, a report interval - expression. The basic report intervals are daily, weekly, monthly, + The argument of -p can also begin with, or be, a report interval + expression. The basic report intervals are daily, weekly, monthly, quarterly, or yearly, which have the same effect as the -D,-W,-M,-Q, or - -Y flags. Between report interval and start/end dates (if any), the + -Y flags. Between report interval and start/end dates (if any), the word in is optional. Examples: @@ -442,7 +433,7 @@ OPTIONS -p "quarterly" The following more complex report intervals are also supported: - biweekly, bimonthly, every N days|weeks|months|quarters|years, + biweekly, bimonthly, every N days|weeks|months|quarters|years, every Nth day [of month], every Nth day of week. Examples: @@ -452,19 +443,19 @@ OPTIONS -p "every 2 weeks" -p "every 5 days from 1/3" - Show historical balances at end of 15th each month (N is exclusive end + Show historical balances at end of 15th each month (N is exclusive end date): hledger balance -H -p "every 16th day" - Group postings from start of wednesday to end of next tuesday (N is + Group postings from start of wednesday to end of next tuesday (N is start date and exclusive end date): hledger register checking -p "every 3rd day of week" Depth limiting - With the --depth N option, commands like account, balance and register - will show only the uppermost accounts in the account tree, down to + With the --depth N option, commands like account, balance and register + will show only the uppermost accounts in the account tree, down to level N. Use this when you want a summary with less detail. Pivoting @@ -472,17 +463,17 @@ OPTIONS on account name. The --pivot TAGNAME option causes it to sum and orga- nize hierarchy based on some other field instead. - TAGNAME is the full, case-insensitive name of a tag you have defined, - or one of the built-in implicit tags (like code or payee). As with - account names, when tag values have multiple:colon-separated:parts + TAGNAME is the full, case-insensitive name of a tag you have defined, + or one of the built-in implicit tags (like code or payee). As with + account names, when tag values have multiple:colon-separated:parts hledger will build hierarchy, displayed in tree-mode reports, summaris- able with a depth limit, and so on. - --pivot affects all reports, and is one of those options you can write - before the command name if you wish. You can think of hledger trans- - forming the journal before any other processing, replacing every post- + --pivot affects all reports, and is one of those options you can write + before the command name if you wish. You can think of hledger trans- + forming the journal before any other processing, replacing every post- ing's account name with the value of the specified tag on that posting, - inheriting it from the transaction or using a blank value if it's not + inheriting it from the transaction or using a blank value if it's not present. An example: @@ -507,7 +498,7 @@ OPTIONS -------------------- 0 - One way to show only amounts with a member: value (using a query, + One way to show only amounts with a member: value (using a query, described below): $ hledger balance --pivot member tag:member=. @@ -515,7 +506,7 @@ OPTIONS -------------------- -2 EUR - Another way (the acct: query matches against the pivoted "account + Another way (the acct: query matches against the pivoted "account name"): $ hledger balance --pivot member acct:. @@ -526,56 +517,56 @@ OPTIONS Regular expressions hledger uses regular expressions in a number of places: - o query terms, on the command line and in the hledger-web search form: + o query terms, on the command line and in the hledger-web search form: REGEX, desc:REGEX, cur:REGEX, tag:...=REGEX o CSV rules conditional blocks: if REGEX ... - o account alias directives and options: alias /REGEX/ = REPLACEMENT, + o account alias directives and options: alias /REGEX/ = REPLACEMENT, --alias /REGEX/=REPLACEMENT - hledger's regular expressions come from the regex-tdfa library. In + hledger's regular expressions come from the regex-tdfa library. In general they: o are case insensitive - o are infix matching (do not need to match the entire thing being + o are infix matching (do not need to match the entire thing being matched) o are POSIX extended regular expressions o also support GNU word boundaries (\<, \>, \b, \B) - o and parenthesised capturing groups and numeric backreferences in + o and parenthesised capturing groups and numeric backreferences in replacement strings o do not support mode modifiers like (?s) Some things to note: - o In the alias directive and --alias option, regular expressions must - be enclosed in forward slashes (/REGEX/). Elsewhere in hledger, + o In the alias directive and --alias option, regular expressions must + be enclosed in forward slashes (/REGEX/). Elsewhere in hledger, these are not required. o To match a regular expression metacharacter like $ as a literal char- acter, prepend a backslash. Eg to search for amounts with the dollar sign in hledger-web, write cur:\$. - o On the command line, some metacharacters like $ have a special mean- + o On the command line, some metacharacters like $ have a special mean- ing to the shell and so must be escaped a second time, with single or - double quotes or another backslash. Eg, to match amounts with the + double quotes or another backslash. Eg, to match amounts with the dollar sign from the command line, write cur:'\$' or cur:\\$. QUERIES - One of hledger's strengths is being able to quickly report on precise - subsets of your data. Most commands accept an optional query expres- - sion, written as arguments after the command name, to filter the data - by date, account name or other criteria. The syntax is similar to a + One of hledger's strengths is being able to quickly report on precise + subsets of your data. Most commands accept an optional query expres- + sion, written as arguments after the command name, to filter the data + by date, account name or other criteria. The syntax is similar to a web search: one or more space-separated search terms, quotes to enclose - whitespace, optional prefixes to match specific fields. Multiple + whitespace, optional prefixes to match specific fields. Multiple search terms are combined as follows: - All commands except print: show transactions/postings/accounts which + All commands except print: show transactions/postings/accounts which match (or negatively match) o any of the description terms AND @@ -602,22 +593,22 @@ QUERIES same as above amt:N, amt:N, amt:>=N - match postings with a single-commodity amount that is equal to, - less than, or greater than N. (Multi-commodity amounts are not + match postings with a single-commodity amount that is equal to, + less than, or greater than N. (Multi-commodity amounts are not tested, and will always match.) The comparison has two modes: if N is preceded by a + or - sign (or is 0), the two signed numbers - are compared. Otherwise, the absolute magnitudes are compared, + are compared. Otherwise, the absolute magnitudes are compared, ignoring sign. code:REGEX match by transaction code (eg check number) cur:REGEX - match postings or transactions including any amounts whose cur- - rency/commodity symbol is fully matched by REGEX. (For a par- + match postings or transactions including any amounts whose cur- + rency/commodity symbol is fully matched by REGEX. (For a par- tial match, use .*REGEX.*). Note, to match characters which are regex-significant, like the dollar sign ($), you need to prepend - \. And when using the command line you need to add one more + \. And when using the command line you need to add one more level of quoting to hide it from the shell, so eg do: hledger print cur:'\$' or hledger print cur:\\$. @@ -626,29 +617,29 @@ QUERIES date:PERIODEXPR match dates within the specified period. PERIODEXPR is a period - expression (with no report interval). Examples: date:2016, - date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the - --date2 command line flag is present, this matches secondary + expression (with no report interval). Examples: date:2016, + date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the + --date2 command line flag is present, this matches secondary dates instead. date2:PERIODEXPR match secondary dates within the specified period. depth:N - match (or display, depending on command) accounts at or above + match (or display, depending on command) accounts at or above this depth real:, real:0 match real or virtual postings respectively status:*, status:!, status: - match cleared, pending, or uncleared/pending transactions + match cleared, pending, or uncleared/pending transactions respectively tag:REGEX[=REGEX] - match by tag name, and optionally also by tag value. Note a - tag: query is considered to match a transaction if it matches - any of the postings. Also remember that postings inherit the + match by tag name, and optionally also by tag value. Note a + tag: query is considered to match a transaction if it matches + any of the postings. Also remember that postings inherit the tags of their parent transaction. not: before any of the above negates the match. @@ -656,24 +647,24 @@ QUERIES inacct:ACCTNAME a special term used automatically when you click an account name in hledger-web, specifying the account register we are currently - in (selects the transactions of that account and how to show - them, can be filtered further with acct etc). Not supported + in (selects the transactions of that account and how to show + them, can be filtered further with acct etc). Not supported elsewhere in hledger. Some of these can also be expressed as command-line options (eg depth:2 - is equivalent to --depth 2). Generally you can mix options and query - arguments, and the resulting query will be their intersection (perhaps + is equivalent to --depth 2). Generally you can mix options and query + arguments, and the resulting query will be their intersection (perhaps excluding the -p/--period option). COMMANDS - hledger provides a number of subcommands; hledger with no arguments + hledger provides a number of subcommands; hledger with no arguments shows a list. If you install additional hledger-* packages, or if you put programs or - scripts named hledger-NAME in your PATH, these will also be listed as + scripts named hledger-NAME in your PATH, these will also be listed as subcommands. - Run a subcommand by writing its name as first argument (eg + Run a subcommand by writing its name as first argument (eg hledger incomestatement). You can also write any unambiguous prefix of a command name (hledger inc), or one of the standard short aliases dis- played in the command list (hledger is). @@ -688,14 +679,14 @@ COMMANDS --drop=N in flat mode: omit N leading account name parts - This command lists all account names that are in use (ie, all the - accounts which have at least one transaction posting to them). With + This command lists all account names that are in use (ie, all the + accounts which have at least one transaction posting to them). With query arguments, only matched account names are shown. - It shows a flat list by default. With --tree, it uses indentation to + It shows a flat list by default. With --tree, it uses indentation to show the account hierarchy. - In flat mode you can add --drop N to omit the first few account name + In flat mode you can add --drop N to omit the first few account name components. Examples: @@ -738,8 +729,8 @@ COMMANDS activity Show an ascii barchart of posting counts per interval. - The activity command displays an ascii histogram showing transaction - counts by day, week, month or other reporting interval (by day is the + The activity command displays an ascii histogram showing transaction + counts by day, week, month or other reporting interval (by day is the default). With query arguments, it counts only matched transactions. $ hledger activity --quarterly @@ -752,24 +743,24 @@ COMMANDS Prompt for transactions and add them to the journal. --no-new-accounts - don't allow creating new accounts; helps prevent typos when + don't allow creating new accounts; helps prevent typos when entering account names - Many hledger users edit their journals directly with a text editor, or - generate them from CSV. For more interactive data entry, there is the - add command, which prompts interactively on the console for new trans- - actions, and appends them to the journal file (if there are multiple + Many hledger users edit their journals directly with a text editor, or + generate them from CSV. For more interactive data entry, there is the + add command, which prompts interactively on the console for new trans- + actions, and appends them to the journal file (if there are multiple -f FILE options, the first file is used.) Existing transactions are not - changed. This is the only hledger command that writes to the journal + changed. This is the only hledger command that writes to the journal file. To use it, just run hledger add and follow the prompts. You can add as - many transactions as you like; when you are finished, enter . or press + many transactions as you like; when you are finished, enter . or press control-d or control-c to exit. Features: - o add tries to provide useful defaults, using the most similar recent + o add tries to provide useful defaults, using the most similar recent transaction (by description) as a template. o You can also set the initial defaults with command line arguments. @@ -777,20 +768,20 @@ COMMANDS o Readline-style edit keys can be used during data entry. o The tab key will auto-complete whenever possible - accounts, descrip- - tions, dates (yesterday, today, tomorrow). If the input area is + tions, dates (yesterday, today, tomorrow). If the input area is empty, it will insert the default value. - o If the journal defines a default commodity, it will be added to any + o If the journal defines a default commodity, it will be added to any bare numbers entered. o A parenthesised transaction code may be entered following a date. o Comments and tags may be entered following a description or amount. - o If you make a mistake, enter < at any prompt to restart the transac- + o If you make a mistake, enter < at any prompt to restart the transac- tion. - o Input prompts are displayed in a different colour when the terminal + o Input prompts are displayed in a different colour when the terminal supports it. Example (see the tutorial for a detailed explanation): @@ -827,7 +818,7 @@ COMMANDS show balance change in each period (default) --cumulative - show balance change accumulated across periods (in multicolumn + show balance change accumulated across periods (in multicolumn reports) -H --historical @@ -862,10 +853,13 @@ COMMANDS select the output format. Supported formats: txt, csv. -o FILE --output-file=FILE - write output to FILE. A file extension matching one of the + write output to FILE. A file extension matching one of the above formats selects that format. - The balance command displays accounts and balances. It is hledger's + --pretty-tables + Use unicode to display prettier tables. + + The balance command displays accounts and balances. It is hledger's most featureful and most useful command. $ hledger balance @@ -882,24 +876,24 @@ COMMANDS -------------------- 0 - More precisely, the balance command shows the change to each account's + More precisely, the balance command shows the change to each account's balance caused by all (matched) postings. In the common case where you - do not filter by date and your journal sets the correct opening bal- + do not filter by date and your journal sets the correct opening bal- ances, this is the same as the account's ending balance. - By default, accounts are displayed hierarchically, with subaccounts + By default, accounts are displayed hierarchically, with subaccounts indented below their parent. "Boring" accounts, which contain a single interesting subaccount and no balance of their own, are elided into the - following line for more compact output. (Use --no-elide to prevent + following line for more compact output. (Use --no-elide to prevent this.) - Each account's balance is the "inclusive" balance - it includes the + Each account's balance is the "inclusive" balance - it includes the balances of any subaccounts. - Accounts which have zero balance (and no non-zero subaccounts) are + Accounts which have zero balance (and no non-zero subaccounts) are omitted. Use -E/--empty to show them. - A final total is displayed by default; use -N/--no-total to suppress + A final total is displayed by default; use -N/--no-total to suppress it: $ hledger balance -p 2008/6 expenses --no-total @@ -909,9 +903,9 @@ COMMANDS Flat mode To see a flat list of full account names instead of the default hierar- - chical display, use --flat. In this mode, accounts (unless + chical display, use --flat. In this mode, accounts (unless depth-clipped) show their "exclusive" balance, excluding any subaccount - balances. In this mode, you can also use --drop N to omit the first + balances. In this mode, you can also use --drop N to omit the first few account name components. $ hledger balance -p 2008/6 expenses -N --flat --drop 1 @@ -919,9 +913,9 @@ COMMANDS $1 supplies Depth limited balance reports - With --depth N, balance shows accounts only to the specified depth. - This is very useful to show a complex charts of accounts in less - detail. In flat mode, balances from accounts below the depth limit + With --depth N, balance shows accounts only to the specified depth. + This is very useful to show a complex charts of accounts in less + detail. In flat mode, balances from accounts below the depth limit will be shown as part of a parent account at the depth limit. $ hledger balance -N --depth 1 @@ -931,12 +925,12 @@ COMMANDS $1 liabilities Multicolumn balance reports - With a reporting interval, multiple balance columns will be shown, one - for each report period. There are three types of multi-column balance + With a reporting interval, multiple balance columns will be shown, one + for each report period. There are three types of multi-column balance report, showing different information: 1. By default: each column shows the sum of postings in that period, ie - the account's change of balance in that period. This is useful eg + the account's change of balance in that period. This is useful eg for a monthly income statement: $ hledger balance --quarterly income expenses -E @@ -951,8 +945,8 @@ COMMANDS -------------------++--------------------------------- || $-1 $1 0 0 - 2. With --cumulative: each column shows the ending balance for that - period, accumulating the changes across periods, starting from 0 at + 2. With --cumulative: each column shows the ending balance for that + period, accumulating the changes across periods, starting from 0 at the report start date: $ hledger balance --quarterly income expenses -E --cumulative @@ -968,8 +962,8 @@ COMMANDS || $-1 0 0 0 3. With --historical/-H: each column shows the actual historical ending - balance for that period, accumulating the changes across periods, - starting from the actual balance at the report start date. This is + balance for that period, accumulating the changes across periods, + starting from the actual balance at the report start date. This is useful eg for a multi-period balance sheet, and when you are showing only the data after a certain start date: @@ -985,26 +979,26 @@ COMMANDS ----------------------++------------------------------------- || 0 0 0 - Multi-column balance reports display accounts in flat mode by default; + Multi-column balance reports display accounts in flat mode by default; to see the hierarchy, use --tree. - With a reporting interval (like --quarterly above), the report - start/end dates will be adjusted if necessary so that they encompass + With a reporting interval (like --quarterly above), the report + start/end dates will be adjusted if necessary so that they encompass the displayed report periods. This is so that the first and last peri- ods will be "full" and comparable to the others. - The -E/--empty flag does two things in multicolumn balance reports: - first, the report will show all columns within the specified report - period (without -E, leading and trailing columns with all zeroes are - not shown). Second, all accounts which existed at the report start - date will be considered, not just the ones with activity during the + The -E/--empty flag does two things in multicolumn balance reports: + first, the report will show all columns within the specified report + period (without -E, leading and trailing columns with all zeroes are + not shown). Second, all accounts which existed at the report start + date will be considered, not just the ones with activity during the report period (use -E to include low-activity accounts which would oth- erwise would be omitted). The -T/--row-total flag adds an additional column showing the total for each row. - The -A/--average flag adds a column showing the average value in each + The -A/--average flag adds a column showing the average value in each row. Here's an example of all three: @@ -1028,10 +1022,10 @@ COMMANDS Market value The -V/--value flag converts the reported amounts to their market value on the report end date, using the most recent applicable market prices, - when known. Specifically, when there is a market price (P directive) + when known. Specifically, when there is a market price (P directive) for the amount's commodity, dated on or before the report end date (see - hledger -> Report start & end date), the amount will be converted to - the price's commodity. If multiple applicable prices are defined, the + hledger -> Report start & end date), the amount will be converted to + the price's commodity. If multiple applicable prices are defined, the latest-dated one is used (and if dates are equal, the one last parsed). For example: @@ -1063,13 +1057,13 @@ COMMANDS $ hledger -f t.j bal euros -V -e 2016/12/21 $103.00 assets:euros - Currently, hledger's -V only uses market prices recorded with P direc- + Currently, hledger's -V only uses market prices recorded with P direc- tives, not transaction prices (unlike Ledger). Using -B and -V together is allowed. Custom balance output - In simple (non-multi-column) balance reports, you can customise the + In simple (non-multi-column) balance reports, you can customise the output with --format FMT: $ hledger balance --format "%20(account) %12(total)" @@ -1087,7 +1081,7 @@ COMMANDS 0 The FMT format string (plus a newline) specifies the formatting applied - to each account/balance pair. It may contain any suitable text, with + to each account/balance pair. It may contain any suitable text, with data fields interpolated like so: %[MIN][.MAX](FIELDNAME) @@ -1098,14 +1092,14 @@ COMMANDS o FIELDNAME must be enclosed in parentheses, and can be one of: - o depth_spacer - a number of spaces equal to the account's depth, or + o depth_spacer - a number of spaces equal to the account's depth, or if MIN is specified, MIN * depth spaces. o account - the account's name o total - the account's balance/posted total, right justified - Also, FMT can begin with an optional prefix to control how multi-com- + Also, FMT can begin with an optional prefix to control how multi-com- modity amounts are rendered: o %_ - render on multiple lines, bottom-aligned (the default) @@ -1114,7 +1108,7 @@ COMMANDS o %, - render on one line, comma-separated - There are some quirks. Eg in one-line mode, %(depth_spacer) has no + There are some quirks. Eg in one-line mode, %(depth_spacer) has no effect, instead %(account) has indentation built in. Experimentation may be needed to get pleasing results. @@ -1122,19 +1116,19 @@ COMMANDS o %(total) - the account's total - o %-20.20(account) - the account's name, left justified, padded to 20 + o %-20.20(account) - the account's name, left justified, padded to 20 characters and clipped at 20 characters - o %,%-50(account) %25(total) - account name padded to 50 characters, - total padded to 20 characters, with multiple commodities rendered on + o %,%-50(account) %25(total) - account name padded to 50 characters, + total padded to 20 characters, with multiple commodities rendered on one line - o %20(total) %2(depth_spacer)%-(account) - the default format for the + o %20(total) %2(depth_spacer)%-(account) - the default format for the single-column balance report Output destination - The balance, print, register and stats commands can write their output - to a destination other than the console. This is controlled by the + The balance, print, register and stats 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) @@ -1142,8 +1136,8 @@ COMMANDS CSV output The balance, print and register commands can write their output as CSV. - This is useful for exporting data to other applications, eg to make - charts in a spreadsheet. This is controlled by the -O/--output-format + This is useful for exporting data to other applications, eg to make + charts in a spreadsheet. This is controlled by the -O/--output-format option, or by specifying a .csv file extension with -o/--output-file. $ hledger balance -O csv # write CSV to stdout @@ -1157,7 +1151,7 @@ COMMANDS balances --cumulative - show balance change accumulated across periods (in multicolumn + show balance change accumulated across periods (in multicolumn reports), instead of historical ending balances -H --historical @@ -1188,8 +1182,8 @@ COMMANDS --format=LINEFORMAT in single-column balance reports: use this custom line format - This command displays a simple balance sheet. It currently assumes - that you have top-level accounts named asset and liability (plural + This command displays a simple balance sheet. It currently assumes + that you have top-level accounts named asset and liability (plural forms also allowed.) $ hledger balancesheet @@ -1211,12 +1205,12 @@ COMMANDS -------------------- 0 - If given a period flag, renders a multi-column balance with the same - format as balance, with asset and liability totals as well as an over- + If given a period flag, renders a multi-column balance with the same + format as balance, with asset and liability totals as well as an over- all total if desired. - This command shows normally historical end-balance reports, but for - flexibility, also accepts --cumulative and --change to display cumula- + This command shows normally historical end-balance reports, but for + flexibility, also accepts --cumulative and --change to display cumula- tive ending balances and changes in reporting periods. cashflow @@ -1226,7 +1220,7 @@ COMMANDS show balance change in each period (default) --cumulative - show balance change accumulated across periods (in multicolumn + show balance change accumulated across periods (in multicolumn reports), instead of changes during periods -H --historical @@ -1257,9 +1251,9 @@ COMMANDS --format=LINEFORMAT in single-column balance reports: use this custom line format - This command displays a simple cashflow statement It shows the change - in all "cash" (ie, liquid assets) accounts for the period. It cur- - rently assumes that cash accounts are under a top-level account named + This command displays a simple cashflow statement It shows the change + in all "cash" (ie, liquid assets) accounts for the period. It cur- + rently assumes that cash accounts are under a top-level account named asset and do not contain receivable or A/R (plural forms also allowed.) $ hledger cashflow @@ -1276,7 +1270,7 @@ COMMANDS -------------------- $-1 - If given a period flag, renders a multi-column balance with the same + If given a period flag, renders a multi-column balance with the same format as balance. This command normally shows period change reports, but for flexibility, @@ -1286,11 +1280,11 @@ COMMANDS help Show any of the hledger manuals. - The help command displays any of the main hledger man pages. (Unlike - hledger --help, which displays only the hledger man page.) Run it with - no arguments to list available topics (their names are shortened for - easier typing), and run hledger help TOPIC to select one. The output - is similar to a man page, but fixed width. It may be long, so you may + The help command displays any of the main hledger man pages. (Unlike + hledger --help, which displays only the hledger man page.) Run it with + no arguments to list available topics (their names are shortened for + easier typing), and run hledger help TOPIC to select one. The output + is similar to a man page, but fixed width. It may be long, so you may wish to pipe it into a pager. See also info and man. $ hledger help @@ -1318,7 +1312,7 @@ COMMANDS show balance change in each period (default) --cumulative - show balance change accumulated across periods (in multicolumn + show balance change accumulated across periods (in multicolumn reports), instead of changes during periods -H --historical @@ -1349,8 +1343,8 @@ COMMANDS --format=LINEFORMAT in single-column balance reports: use this custom line format - This command displays a simple income statement. It currently assumes - that you have top-level accounts named income (or revenue) and expense + This command displays a simple income statement. It currently assumes + that you have top-level accounts named income (or revenue) and expense (plural forms also allowed.) $ hledger incomestatement @@ -1374,7 +1368,7 @@ COMMANDS -------------------- 0 - If given a period flag, renders a multi-column balance with the same + If given a period flag, renders a multi-column balance with the same format as balance. This command normally shows period change reports, but for flexibility, @@ -1384,23 +1378,23 @@ COMMANDS info Show any of the hledger manuals using info. - The info command displays any of the hledger reference manuals using - the info hypertextual documentation viewer. This can be a very effi- - cient way to browse large manuals. It requires the "info" program to + The info command displays any of the hledger reference manuals using + the info hypertextual documentation viewer. This can be a very effi- + cient way to browse large manuals. It requires the "info" program to be available in your PATH. - As with help, run it with no arguments to list available topics (manu- + As with help, run it with no arguments to list available topics (manu- als). man Show any of the hledger manuals using man. - The man command displays any of the hledger reference manuals using - man, the standard documentation viewer on unix systems. This will fit - the text to your terminal width, and probably invoke a pager automati- + The man command displays any of the hledger reference manuals using + man, the standard documentation viewer on unix systems. This will fit + the text to your terminal width, and probably invoke a pager automati- cally. It requires the "man" program to be available in your PATH. - As with help, run it with no arguments to list available topics (manu- + As with help, run it with no arguments to list available topics (manu- als). print @@ -1410,14 +1404,14 @@ COMMANDS show all amounts explicitly -m STR --match=STR - show the transaction whose description is most similar to STR, + show the transaction whose description is most similar to STR, and is most recent -O FMT --output-format=FMT select the output format. Supported formats: txt, csv. -o FILE --output-file=FILE - write output to FILE. A file extension matching one of the + write output to FILE. A file extension matching one of the above formats selects that format. $ hledger print @@ -1445,23 +1439,23 @@ COMMANDS The print command displays full journal entries (transactions) from the journal file, tidily formatted. - As of hledger 1.2, print's output is always a valid hledger journal. - However it may not preserve all original content, eg it does not print + As of hledger 1.2, print's output is always a valid hledger journal. + However it may not preserve all original content, eg it does not print directives or inter-transaction comments. - Normally, transactions' implicit/explicit amount style is preserved: - when an amount is omitted in the journal, it will be omitted in the - output. You can use the -x/--explicit flag to make all amounts - explicit, which can be useful for troubleshooting or for making your - journal more readable and robust against data entry errors. Note, in - this mode postings with a multi-commodity amount (possible with an - implicit amount in a multi-commodity transaction) will be split into + Normally, transactions' implicit/explicit amount style is preserved: + when an amount is omitted in the journal, it will be omitted in the + output. You can use the -x/--explicit flag to make all amounts + explicit, which can be useful for troubleshooting or for making your + journal more readable and robust against data entry errors. Note, in + this mode postings with a multi-commodity amount (possible with an + implicit amount in a multi-commodity transaction) will be split into multiple single-commodity postings, for valid journal output. - With -B/--cost, amounts with transaction prices are converted to cost + With -B/--cost, amounts with transaction prices are converted to cost (using the transaction price). - The print command also supports output destination and CSV output. + The print command also supports output destination and CSV output. Here's an example of print's CSV output: $ hledger print -Ocsv @@ -1478,20 +1472,20 @@ COMMANDS "5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","","" "5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","","" - o There is one CSV record per posting, with the parent transaction's + o There is one CSV record per posting, with the parent transaction's fields repeated. o The "txnidx" (transaction index) field shows which postings belong to - the same transaction. (This number might change if transactions are - reordered within the file, files are parsed/included in a different + the same transaction. (This number might change if transactions are + reordered within the file, files are parsed/included in a different order, etc.) - o The amount is separated into "commodity" (the symbol) and "amount" + o The amount is separated into "commodity" (the symbol) and "amount" (numeric quantity) fields. o The numeric amount is repeated in either the "credit" or "debit" col- - umn, for convenience. (Those names are not accurate in the account- - ing sense; it just puts negative amounts under credit and zero or + umn, for convenience. (Those names are not accurate in the account- + ing sense; it just puts negative amounts under credit and zero or greater amounts under debit.) register @@ -1501,7 +1495,7 @@ COMMANDS show running total from report start date (default) -H --historical - show historical running total/balance (includes postings before + show historical running total/balance (includes postings before report start date) -A --average @@ -1512,18 +1506,18 @@ COMMANDS show postings' siblings instead -w N --width=N - set output width (default: terminal width or COLUMNS. -wN,M + set output width (default: terminal width or COLUMNS. -wN,M sets description width as well) -O FMT --output-format=FMT select the output format. Supported formats: txt, csv. -o FILE --output-file=FILE - write output to FILE. A file extension matching one of the + write output to FILE. A file extension matching one of the above formats selects that format. The register command displays postings, one per line, and their running - total. This is typically used with a query selecting a particular + total. This is typically used with a query selecting a particular account, to see that account's activity: $ hledger register checking @@ -1532,8 +1526,8 @@ COMMANDS 2008/06/02 save assets:bank:checking $-1 $1 2008/12/31 pay off assets:bank:checking $-1 0 - The --historical/-H flag adds the balance from any undisplayed prior - postings to the running total. This is useful when you want to see + The --historical/-H flag adds the balance from any undisplayed prior + postings to the running total. This is useful when you want to see only recent activity, with a historically accurate running balance: $ hledger register checking -b 2008/6 --historical @@ -1543,23 +1537,23 @@ COMMANDS The --depth option limits the amount of sub-account detail displayed. - The --average/-A flag shows the running average posting amount instead + The --average/-A flag shows the running average posting amount instead of the running total (so, the final number displayed is the average for - the whole report period). This flag implies --empty (see below). It - is affected by --historical. It works best when showing just one + the whole report period). This flag implies --empty (see below). It + is affected by --historical. It works best when showing just one account and one commodity. - The --related/-r flag shows the other postings in the transactions of + The --related/-r flag shows the other postings in the transactions of the postings which would normally be shown. - With a reporting interval, register shows summary postings, one per + With a reporting interval, register shows summary postings, one per interval, aggregating the postings to each account: $ hledger register --monthly income 2008/01 income:salary $-1 $-1 2008/06 income:gifts $-1 $-2 - Periods with no activity, and summary postings with a zero amount, are + Periods with no activity, and summary postings with a zero amount, are not shown by default; use the --empty/-E flag to see them: $ hledger register --monthly income -E @@ -1576,7 +1570,7 @@ COMMANDS 2008/11 0 $-2 2008/12 0 $-2 - Often, you'll want to see just one line per interval. The --depth + Often, you'll want to see just one line per interval. The --depth option helps with this, causing subaccounts to be aggregated: $ hledger register --monthly assets --depth 1h @@ -1584,19 +1578,19 @@ COMMANDS 2008/06 assets $-1 0 2008/12 assets $-1 $-1 - Note when using report intervals, if you specify start/end dates these - will be adjusted outward if necessary to contain a whole number of - intervals. This ensures that the first and last intervals are full + Note when using report intervals, if you specify start/end dates these + will be adjusted outward if necessary to contain a whole number of + intervals. This ensures that the first and last intervals are full length and comparable to the others in the report. Custom register output - register uses the full terminal width by default, except on windows. - You can override this by setting the COLUMNS environment variable (not + register uses the full terminal width by default, except on windows. + You can override this by setting the COLUMNS environment variable (not a bash shell variable) or by using the --width/-w option. - The description and account columns normally share the space equally - (about half of (width - 40) each). You can adjust this by adding a - description width as part of --width's argument, comma-separated: + The description and account columns normally share the space equally + (about half of (width - 40) each). You can adjust this by adding a + description width as part of --width's argument, comma-separated: --width W,D . Here's a diagram: <--------------------------------- width (W) ----------------------------------> @@ -1612,14 +1606,14 @@ COMMANDS $ hledger reg -w 100,40 # set overall width 100, description width 40 $ hledger reg -w $COLUMNS,40 # use terminal width, and set description width - The register command also supports the -o/--output-file and -O/--out- + The register command also supports the -o/--output-file and -O/--out- put-format options for controlling output destination and CSV output. stats Show some journal statistics. -o FILE --output-file=FILE - write output to FILE. A file extension matching one of the + write output to FILE. A file extension matching one of the above formats selects that format. $ hledger stats @@ -1634,8 +1628,8 @@ COMMANDS Accounts : 8 (depth 3) Commodities : 1 ($) - The stats command displays summary information for the whole journal, - or a matched part of it. With a reporting interval, it shows a report + The stats command displays summary information for the whole journal, + or a matched part of it. With a reporting interval, it shows a report for each report period. The stats command also supports -o/--output-file for controlling output @@ -1647,34 +1641,34 @@ COMMANDS $ hledger test Cases: 74 Tried: 74 Errors: 0 Failures: 0 - This command runs hledger's built-in unit tests and displays a quick + This command runs hledger's built-in unit tests and displays a quick report. With a regular expression argument, it selects only tests with matching names. It's mainly used in development, but it's also nice to be able to check your hledger executable for smoke at any time. ADD-ON COMMANDS - hledger also searches for external add-on commands, and will include + hledger also searches for external add-on commands, and will include these in the commands list. These are programs or scripts in your PATH - whose name starts with hledger- and ends with a recognised file exten- + whose name starts with hledger- and ends with a recognised file exten- sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh). - Add-ons can be invoked like any hledger command, but there are a few + Add-ons can be invoked like any hledger command, but there are a few things to be aware of. Eg if the hledger-web add-on is installed, o hledger -h web shows hledger's help, while hledger web -h shows hledger-web's help. - o Flags specific to the add-on must have a preceding -- to hide them - from hledger. So hledger web --serve --port 9000 will be rejected; + o Flags specific to the add-on must have a preceding -- to hide them + from hledger. So hledger web --serve --port 9000 will be rejected; you must use hledger web -- --serve --port 9000. - o You can always run add-ons directly if preferred: + o You can always run add-ons directly if preferred: hledger-web --serve --port 9000. - Add-ons are a relatively easy way to add local features or experiment - with new ideas. They can be written in any language, but haskell - scripts have a big advantage: they can use the same hledger (and - haskell) library functions that built-in commands do, for command-line + Add-ons are a relatively easy way to add local features or experiment + with new ideas. They can be written in any language, but haskell + scripts have a big advantage: they can use the same hledger (and + haskell) library functions that built-in commands do, for command-line options, journal parsing, reporting, etc. Here are some hledger add-ons available: @@ -1692,7 +1686,7 @@ ADD-ON COMMANDS hledger-web provides a simple web interface. Third party add-ons - These are maintained separately, and usually updated shortly after a + These are maintained separately, and usually updated shortly after a hledger release. diff @@ -1700,7 +1694,7 @@ ADD-ON COMMANDS journal file and another. iadd - hledger-iadd is a curses-style, more interactive replacement for the + hledger-iadd is a curses-style, more interactive replacement for the add command. interest @@ -1708,19 +1702,19 @@ ADD-ON COMMANDS ing to various schemes. irr - hledger-irr calculates the internal rate of return of an investment + hledger-irr calculates the internal rate of return of an investment account. Experimental add-ons - These are available in source form in the hledger repo's bin/ direc- + These are available in source form in the hledger repo's bin/ direc- tory; installing them is pretty easy. They may be less mature and doc- - umented than built-in commands. Reading and tweaking these is a good + umented than built-in commands. Reading and tweaking these is a good way to start making your own! autosync hledger-autosync is a symbolic link for easily running ledger-autosync, - if installed. ledger-autosync does deduplicating conversion of OFX - data and some CSV formats, and can also download the data if your bank + if installed. ledger-autosync does deduplicating conversion of OFX + data and some CSV formats, and can also download the data if your bank offers OFX Direct Connect. budget @@ -1736,18 +1730,18 @@ ADD-ON COMMANDS hledger-check-dates.hs checks that journal entries are ordered by date. check-dupes - hledger-check-dupes.hs checks for account names sharing the same leaf + hledger-check-dupes.hs checks for account names sharing the same leaf name. equity - hledger-equity.hs prints balance-resetting transactions, useful for + hledger-equity.hs prints balance-resetting transactions, useful for bringing account balances across file boundaries. prices hledger-prices.hs prints all prices from the journal. print-unique - hledger-print-unique.hs prints transactions which do not reuse an + hledger-print-unique.hs prints transactions which do not reuse an already-seen description. register-match @@ -1760,26 +1754,26 @@ ADD-ON COMMANDS TROUBLESHOOTING Run-time problems - Here are some issues you might encounter when you run hledger (and - remember you can also seek help from the IRC channel, mail list or bug + Here are some issues you might encounter when you run hledger (and + remember you can also seek help from the IRC channel, mail list or bug tracker): Successfully installed, but "No command 'hledger' found" stack and cabal install binaries into a special directory, which should - be added to your PATH environment variable. Eg on unix-like systems, + be added to your PATH environment variable. Eg on unix-like systems, that is ~/.local/bin and ~/.cabal/bin respectively. I set a custom LEDGER_FILE, but hledger is still using the default file - LEDGER_FILE should be a real environment variable, not just a shell - variable. The command env | grep LEDGER_FILE should show it. You may + LEDGER_FILE should be a real environment variable, not just a shell + variable. The command env | grep LEDGER_FILE should show it. You may need to use export. Here's an explanation. - "Illegal byte sequence" or "Invalid or incomplete multibyte or wide + "Illegal byte sequence" or "Invalid or incomplete multibyte or wide character" errors In order to handle non-ascii letters and symbols (like ), hledger needs an appropriate locale. This is usually configured system-wide; you can also configure it temporarily. The locale may need to be one that sup- - ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always, + ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always, I'm not sure yet). Here's an example of setting the locale temporarily, on ubuntu @@ -1798,7 +1792,7 @@ TROUBLESHOOTING $ echo "export LANG=en_US.UTF-8" >>~/.bash_profile $ bash --login - If we preferred to use eg fr_FR.utf8, we might have to install that + If we preferred to use eg fr_FR.utf8, we might have to install that first: $ apt-get install language-pack-fr @@ -1819,45 +1813,45 @@ TROUBLESHOOTING Known limitations Command line interface - Add-on command options, unless they are also understood by the main - hledger executable, must be written after --, like this: + Add-on command options, unless they are also understood by the main + hledger executable, must be written after --, like this: hledger web -- --server Differences from Ledger - Not all of Ledger's journal file syntax is supported. See file format + Not all of Ledger's journal file syntax is supported. See file format differences. - hledger is slower than Ledger, and uses more memory, on large data + hledger is slower than Ledger, and uses more memory, on large data files. Windows limitations - In a windows CMD window, non-ascii characters and colours are not sup- + In a windows CMD window, non-ascii characters and colours are not sup- ported. In a windows Cygwin/MSYS/Mintty window, the tab key is not supported in hledger add. ENVIRONMENT - COLUMNS The screen width used by the register command. Default: the + COLUMNS The screen width used by the register command. Default: the full terminal width. LEDGER_FILE The journal file path when not specified with -f. Default: - ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). FILES - Reads data from one or more files in hledger journal, timeclock, time- - dot, or CSV format specified with -f, or $LEDGER_FILE, or - $HOME/.hledger.journal (on windows, perhaps + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). BUGS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. - hledger can't render non-ascii characters when run from a Windows com- + hledger can't render non-ascii characters when run from a Windows com- mand prompt (up to Windows 7 at least). When input data contains non-ascii characters, a suitable system locale @@ -1867,7 +1861,7 @@ BUGS REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -1881,7 +1875,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1)