From a505ffd3bf8b6cc6f8a1e2cd4a4c88dc0114bc48 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 9 Sep 2024 13:23:13 -0700 Subject: [PATCH] ;doc: update help --- hledger/Hledger/Cli/Commands/Register.md | 5 +++-- hledger/Hledger/Cli/Commands/Register.txt | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Register.md b/hledger/Hledger/Cli/Commands/Register.md index c81a164dc..170ab7a0f 100644 --- a/hledger/Hledger/Cli/Commands/Register.md +++ b/hledger/Hledger/Cli/Commands/Register.md @@ -16,8 +16,9 @@ Flags: description closest to DESC -r --related show postings' siblings instead --invert display all amounts with reversed sign - --sort=FIELDS comma-separated list of fields used to sort - transactions + --sort=FIELDS sort by: date, desc, account, amount, absamount, + or a comma-separated combination of these. For a + descending sort, prefix with -. (Default: date) -w --width=N set output width (default: terminal width or $COLUMNS). -wN,M sets description width as well. --align-all guarantee alignment across all lines (slower) diff --git a/hledger/Hledger/Cli/Commands/Register.txt b/hledger/Hledger/Cli/Commands/Register.txt index d146c53b5..dacab899e 100644 --- a/hledger/Hledger/Cli/Commands/Register.txt +++ b/hledger/Hledger/Cli/Commands/Register.txt @@ -15,6 +15,9 @@ Flags: description closest to DESC -r --related show postings' siblings instead --invert display all amounts with reversed sign + --sort=FIELDS sort by: date, desc, account, amount, absamount, + or a comma-separated combination of these. For a + descending sort, prefix with -. (Default: date) -w --width=N set output width (default: terminal width or $COLUMNS). -wN,M sets description width as well. --align-all guarantee alignment across all lines (slower) @@ -73,6 +76,13 @@ income account where amounts are normally displayed as negative numbers. It's also useful to show postings on the checking account together with the related account: +The --sort=FIELDS flag sorts by the fields given, which can be any of +account, amount, absamount, date, or desc/description, optionally +separated by commas. For example, --sort account,amount will group all +transactions in each account, sorted by transaction amount. Each field +can be negated by a preceding -, so --sort -amount will show +transactions ordered from smallest amount to largest amount. + $ hledger register --related --invert assets:checking With a reporting interval, register shows summary postings, one per