doc: update manuals re --sort-amount

This commit is contained in:
Simon Michael 2017-09-29 19:31:44 -10:00
parent 62c822c1e6
commit 8c86d9b578
7 changed files with 358 additions and 304 deletions

View File

@ -881,9 +881,7 @@ Anywhere it matches inside an account name, the matched part will be
replaced by REPLACEMENT. replaced by REPLACEMENT.
If REGEX contains parenthesised match groups, these can be referenced by If REGEX contains parenthesised match groups, these can be referenced by
the usual numeric backreferences in REPLACEMENT. the usual numeric backreferences in REPLACEMENT.
Note, currently regular expression aliases may cause noticeable Eg:
slow\-downs.
(And if you use Ledger on your hledger file, they will be ignored.) Eg:
.IP .IP
.nf .nf
\f[C] \f[C]
@ -891,6 +889,9 @@ alias\ /^(.+):bank:([^:]+)(.*)/\ =\ \\1:\\2\ \\3
#\ rewrites\ "assets:bank:wells\ fargo:checking"\ to\ \ "assets:wells\ fargo\ checking" #\ rewrites\ "assets:bank:wells\ fargo:checking"\ to\ \ "assets:wells\ fargo\ checking"
\f[] \f[]
.fi .fi
.PP
Also note that REPLACEMENT continues to the end of line (or on command
line, to end of option argument), so it can contain trailing whitespace.
.SS Multiple aliases .SS Multiple aliases
.PP .PP
You can define as many aliases as you like using directives or You can define as many aliases as you like using directives or

View File

@ -841,13 +841,15 @@ alias /REGEX/ = REPLACEMENT
REGEX is a case-insensitive regular expression. Anywhere it matches REGEX is a case-insensitive regular expression. Anywhere it matches
inside an account name, the matched part will be replaced by inside an account name, the matched part will be replaced by
REPLACEMENT. If REGEX contains parenthesised match groups, these can be REPLACEMENT. If REGEX contains parenthesised match groups, these can be
referenced by the usual numeric backreferences in REPLACEMENT. Note, referenced by the usual numeric backreferences in REPLACEMENT. Eg:
currently regular expression aliases may cause noticeable slow-downs.
(And if you use Ledger on your hledger file, they will be ignored.) Eg:
alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3 alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3
# rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking" # rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking"
Also note that REPLACEMENT continues to the end of line (or on
command line, to end of option argument), so it can contain trailing
whitespace.
 
File: hledger_journal.5.info, Node: Multiple aliases, Next: end aliases, Prev: Regex aliases, Up: Account aliases File: hledger_journal.5.info, Node: Multiple aliases, Next: end aliases, Prev: Regex aliases, Up: Account aliases
@ -1121,25 +1123,25 @@ Node: Basic aliases29122
Ref: #basic-aliases29267 Ref: #basic-aliases29267
Node: Regex aliases29957 Node: Regex aliases29957
Ref: #regex-aliases30127 Ref: #regex-aliases30127
Node: Multiple aliases30842 Node: Multiple aliases30845
Ref: #multiple-aliases31016 Ref: #multiple-aliases31019
Node: end aliases31514 Node: end aliases31517
Ref: #end-aliases31656 Ref: #end-aliases31659
Node: account directive31757 Node: account directive31760
Ref: #account-directive31939 Ref: #account-directive31942
Node: apply account directive32235 Node: apply account directive32238
Ref: #apply-account-directive32433 Ref: #apply-account-directive32436
Node: Multi-line comments33092 Node: Multi-line comments33095
Ref: #multi-line-comments33284 Ref: #multi-line-comments33287
Node: commodity directive33412 Node: commodity directive33415
Ref: #commodity-directive33598 Ref: #commodity-directive33601
Node: Default commodity34470 Node: Default commodity34473
Ref: #default-commodity34645 Ref: #default-commodity34648
Node: Default year35182 Node: Default year35185
Ref: #default-year35349 Ref: #default-year35352
Node: Including other files35772 Node: Including other files35775
Ref: #including-other-files35931 Ref: #including-other-files35934
Node: EDITOR SUPPORT36328 Node: EDITOR SUPPORT36331
Ref: #editor-support36448 Ref: #editor-support36451
 
End Tag Table End Tag Table

View File

@ -643,13 +643,15 @@ FILE FORMAT
REGEX is a case-insensitive regular expression. Anywhere it matches REGEX is a case-insensitive regular expression. Anywhere it matches
inside an account name, the matched part will be replaced by REPLACE- inside an account name, the matched part will be replaced by REPLACE-
MENT. If REGEX contains parenthesised match groups, these can be ref- MENT. If REGEX contains parenthesised match groups, these can be ref-
erenced by the usual numeric backreferences in REPLACEMENT. Note, cur- erenced by the usual numeric backreferences in REPLACEMENT. Eg:
rently regular expression aliases may cause noticeable slow-downs.
(And if you use Ledger on your hledger file, they will be ignored.) Eg:
alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3 alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3
# rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking" # rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking"
Also note that REPLACEMENT continues to the end of line (or on command
line, to end of option argument), so it can contain trailing white-
space.
Multiple aliases Multiple aliases
You can define as many aliases as you like using directives or com- You can define as many aliases as you like using directives or com-
mand-line options. Aliases are recursive - each alias sees the result mand-line options. Aliases are recursive - each alias sees the result
@ -813,6 +815,8 @@ EDITOR SUPPORT
Mate-2 Mate-2
Text Wrangler https://github.com/ledger/ledger/wiki/Edit- Text Wrangler https://github.com/ledger/ledger/wiki/Edit-
ing-Ledger-files-with-TextWrangler ing-Ledger-files-with-TextWrangler
Visual Studio https://marketplace.visualstudio.com/items?item- Visual Studio https://marketplace.visualstudio.com/items?item-
Code Name=mark-hansen.hledger-vscode Code Name=mark-hansen.hledger-vscode

View File

@ -207,7 +207,7 @@ Show a balance sheet. Alias: bs.
: in single-column balance reports: use this custom line format : in single-column balance reports: use this custom line format
`--sort-amount` `--sort-amount`
: Sort by amount (total row amount, or by average if that is displayed), instead of account name (in flat mode) : sort by amount instead of account name
This command displays a simple [balance This command displays a simple [balance
sheet](http://en.wikipedia.org/wiki/Balance_sheet). It currently assumes that sheet](http://en.wikipedia.org/wiki/Balance_sheet). It currently assumes that
@ -317,7 +317,7 @@ Show a cashflow statement. Alias: cf.
: in single-column balance reports: use this custom line format : in single-column balance reports: use this custom line format
`--sort-amount` `--sort-amount`
: Sort by amount (total row amount, or by average if that is displayed), instead of account name (in flat mode) : sort by amount instead of account name
This command displays a simple This command displays a simple
[cashflow statement](http://en.wikipedia.org/wiki/Cash_flow_statement) [cashflow statement](http://en.wikipedia.org/wiki/Cash_flow_statement)
@ -444,7 +444,7 @@ Show an income statement. Alias: is.
: in single-column balance reports: use this custom line format : in single-column balance reports: use this custom line format
`--sort-amount` `--sort-amount`
: Sort by amount (total row amount, or by average if that is displayed), instead of account name (in flat mode) : sort by amount instead of account name
This command displays a simple This command displays a simple
[income statement](http://en.wikipedia.org/wiki/Income_statement). It [income statement](http://en.wikipedia.org/wiki/Income_statement). It

View File

@ -1352,6 +1352,12 @@ A file extension matching one of the above formats selects that format.
Use unicode to display prettier tables. Use unicode to display prettier tables.
.RS .RS
.RE .RE
.TP
.B \f[C]\-\-sort\-amount\f[]
Sort by amount (total row amount, or by average if that is displayed),
instead of account name (in flat mode)
.RS
.RE
.PP .PP
The balance command displays accounts and balances. The balance command displays accounts and balances.
It is hledger\[aq]s most featureful and versatile command. It is hledger\[aq]s most featureful and versatile command.
@ -1730,6 +1736,11 @@ don\[aq]t squash boring parent accounts (in tree mode)
in single\-column balance reports: use this custom line format in single\-column balance reports: use this custom line format
.RS .RS
.RE .RE
.TP
.B \f[C]\-\-sort\-amount\f[]
sort by amount instead of account name
.RS
.RE
.PP .PP
This command displays a simple balance sheet. This command displays a simple balance sheet.
It currently assumes that you have top\-level accounts named It currently assumes that you have top\-level accounts named
@ -1869,6 +1880,11 @@ don\[aq]t squash boring parent accounts (in tree mode)
in single\-column balance reports: use this custom line format in single\-column balance reports: use this custom line format
.RS .RS
.RE .RE
.TP
.B \f[C]\-\-sort\-amount\f[]
sort by amount instead of account name
.RS
.RE
.PP .PP
This command displays a simple cashflow statement It shows the change in This command displays a simple cashflow statement It shows the change in
all "cash" (ie, liquid assets) accounts for the period. all "cash" (ie, liquid assets) accounts for the period.
@ -2033,6 +2049,11 @@ don\[aq]t squash boring parent accounts (in tree mode)
in single\-column balance reports: use this custom line format in single\-column balance reports: use this custom line format
.RS .RS
.RE .RE
.TP
.B \f[C]\-\-sort\-amount\f[]
sort by amount instead of account name
.RS
.RE
.PP .PP
This command displays a simple income statement. This command displays a simple income statement.
It currently assumes that you have top\-level accounts named It currently assumes that you have top\-level accounts named

View File

@ -1022,6 +1022,10 @@ Show accounts and their balances. Aliases: b, bal.
'--pretty-tables' '--pretty-tables'
Use unicode to display prettier tables. Use unicode to display prettier tables.
'--sort-amount'
Sort by amount (total row amount, or by average if that is
displayed), instead of account name (in flat mode)
The balance command displays accounts and balances. It is hledger's The balance command displays accounts and balances. It is hledger's
most featureful and versatile command. most featureful and versatile command.
@ -1354,6 +1358,9 @@ Show a balance sheet. Alias: bs.
'--format=LINEFORMAT' '--format=LINEFORMAT'
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
'--sort-amount'
sort by amount instead of account name
This command displays a simple balance sheet. It currently assumes This command displays a simple balance sheet. It currently assumes
that you have top-level accounts named 'asset' and 'liability' (plural that you have top-level accounts named 'asset' and 'liability' (plural
@ -1469,6 +1476,9 @@ Show a cashflow statement. Alias: cf.
'--format=LINEFORMAT' '--format=LINEFORMAT'
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
'--sort-amount'
sort by amount instead of account name
This command displays a simple cashflow statement It shows the change This command displays a simple cashflow statement It shows the change
in all "cash" (ie, liquid assets) accounts for the period. It currently in all "cash" (ie, liquid assets) accounts for the period. It currently
@ -1624,6 +1634,9 @@ Show an income statement. Alias: is.
'--format=LINEFORMAT' '--format=LINEFORMAT'
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
'--sort-amount'
sort by amount instead of account name
This command displays a simple income statement. It currently This command displays a simple income statement. It currently
assumes that you have top-level accounts named 'income' (or 'revenue') assumes that you have top-level accounts named 'income' (or 'revenue')
@ -2224,87 +2237,87 @@ Node: add28403
Ref: #add28504 Ref: #add28504
Node: balance31162 Node: balance31162
Ref: #balance31275 Ref: #balance31275
Node: Flat mode34295 Node: Flat mode34432
Ref: #flat-mode34422 Ref: #flat-mode34559
Node: Depth limited balance reports34842 Node: Depth limited balance reports34979
Ref: #depth-limited-balance-reports35045 Ref: #depth-limited-balance-reports35182
Node: Multicolumn balance reports35465 Node: Multicolumn balance reports35602
Ref: #multicolumn-balance-reports35676 Ref: #multicolumn-balance-reports35813
Node: Custom balance output40324 Node: Custom balance output40461
Ref: #custom-balance-output40508 Ref: #custom-balance-output40645
Node: Colour support42601 Node: Colour support42738
Ref: #colour-support42762 Ref: #colour-support42899
Node: Output destination42935 Node: Output destination43072
Ref: #output-destination43093 Ref: #output-destination43230
Node: CSV output43363 Node: CSV output43500
Ref: #csv-output43482 Ref: #csv-output43619
Node: balancesheet43879 Node: balancesheet44016
Ref: #balancesheet44017 Ref: #balancesheet44154
Node: balancesheetequity45924 Node: balancesheetequity46122
Ref: #balancesheetequity46075 Ref: #balancesheetequity46273
Node: cashflow46864 Node: cashflow47062
Ref: #cashflow46994 Ref: #cashflow47192
Node: check-dates48845 Node: check-dates49104
Ref: #check-dates48974 Ref: #check-dates49233
Node: check-dupes49091 Node: check-dupes49350
Ref: #check-dupes49218 Ref: #check-dupes49477
Node: equity49355 Node: equity49614
Ref: #equity49467 Ref: #equity49726
Node: help49630 Node: help49889
Ref: #help49733 Ref: #help49992
Node: import50807 Node: import51066
Ref: #import50923 Ref: #import51182
Node: incomestatement51318 Node: incomestatement51577
Ref: #incomestatement51454 Ref: #incomestatement51713
Node: prices53346 Node: prices53666
Ref: #prices53463 Ref: #prices53783
Node: print53506 Node: print53826
Ref: #print53618 Ref: #print53938
Node: print-unique58464 Node: print-unique58784
Ref: #print-unique58592 Ref: #print-unique58912
Node: register58660 Node: register58980
Ref: #register58789 Ref: #register59109
Node: Custom register output63290 Node: Custom register output63610
Ref: #custom-register-output63421 Ref: #custom-register-output63741
Node: register-match64718 Node: register-match65038
Ref: #register-match64854 Ref: #register-match65174
Node: rewrite65037 Node: rewrite65357
Ref: #rewrite65156 Ref: #rewrite65476
Node: stats65225 Node: stats65545
Ref: #stats65330 Ref: #stats65650
Node: tags66211 Node: tags66531
Ref: #tags66311 Ref: #tags66631
Node: test66343 Node: test66663
Ref: #test66429 Ref: #test66749
Node: ADD-ON COMMANDS66797 Node: ADD-ON COMMANDS67117
Ref: #add-on-commands66909 Ref: #add-on-commands67229
Node: Official add-ons68196 Node: Official add-ons68516
Ref: #official-add-ons68338 Ref: #official-add-ons68658
Node: api68425 Node: api68745
Ref: #api68516 Ref: #api68836
Node: ui68568 Node: ui68888
Ref: #ui68669 Ref: #ui68989
Node: web68727 Node: web69047
Ref: #web68818 Ref: #web69138
Node: Third party add-ons68864 Node: Third party add-ons69184
Ref: #third-party-add-ons69041 Ref: #third-party-add-ons69361
Node: diff69176 Node: diff69496
Ref: #diff69275 Ref: #diff69595
Node: iadd69374 Node: iadd69694
Ref: #iadd69490 Ref: #iadd69810
Node: interest69573 Node: interest69893
Ref: #interest69696 Ref: #interest70016
Node: irr69791 Node: irr70111
Ref: #irr69891 Ref: #irr70211
Node: Experimental add-ons69969 Node: Experimental add-ons70289
Ref: #experimental-add-ons70123 Ref: #experimental-add-ons70443
Node: autosync70414 Node: autosync70734
Ref: #autosync70528 Ref: #autosync70848
Node: budget70767 Node: budget71087
Ref: #budget70891 Ref: #budget71211
Node: chart70957 Node: chart71277
Ref: #chart71076 Ref: #chart71396
Node: check71147 Node: check71467
Ref: #check71251 Ref: #check71571
 
End Tag Table End Tag Table

View File

@ -917,6 +917,10 @@ COMMANDS
--pretty-tables --pretty-tables
Use unicode to display prettier tables. Use unicode to display prettier tables.
--sort-amount
Sort by amount (total row amount, or by average if that is dis-
played), instead of account name (in flat mode)
The balance command displays accounts and balances. It is hledger's The balance command displays accounts and balances. It is hledger's
most featureful and versatile command. most featureful and versatile command.
@ -1205,6 +1209,9 @@ COMMANDS
--format=LINEFORMAT --format=LINEFORMAT
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
--sort-amount
sort by amount instead of account name
This command displays a simple balance sheet. It currently assumes This command displays a simple balance sheet. It currently assumes
that you have top-level accounts named asset and liability (plural that you have top-level accounts named asset and liability (plural
forms also allowed.) forms also allowed.)
@ -1307,6 +1314,9 @@ COMMANDS
--format=LINEFORMAT --format=LINEFORMAT
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
--sort-amount
sort by amount instead of account name
This command displays a simple cashflow statement It shows the change This command displays a simple cashflow statement It shows the change
in all "cash" (ie, liquid assets) accounts for the period. It cur- in all "cash" (ie, liquid assets) accounts for the period. It cur-
rently assumes that cash accounts are under a top-level account named rently assumes that cash accounts are under a top-level account named
@ -1428,6 +1438,9 @@ COMMANDS
--format=LINEFORMAT --format=LINEFORMAT
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
--sort-amount
sort by amount instead of account name
This command displays a simple income statement. It currently assumes This command displays a simple income statement. It currently assumes
that you have top-level accounts named income (or revenue) and expense that you have top-level accounts named income (or revenue) and expense
(plural forms also allowed.) (plural forms also allowed.)