From 311f0c99eb490bcdd69e2727702d24e99eaa708e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 25 Jan 2023 11:19:03 -1000 Subject: [PATCH] ;doc: areg: more advice on account-matching --- hledger/Hledger/Cli/Commands/Aregister.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Aregister.md b/hledger/Hledger/Cli/Commands/Aregister.md index 0a8f3f299..c9470c586 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.md +++ b/hledger/Hledger/Cli/Commands/Aregister.md @@ -20,8 +20,12 @@ As a quick rule of thumb: `aregister` requires one argument: the account to report on. You can write either the full account name, or a case-insensitive regular expression which will select the alphabetically first matched account. -(Eg if you have `assets:aaa:checking` and `assets:bbb:checking` accounts, -`hledger areg checking` would select `assets:aaa:checking`.) + +When there are multiple matches, the alphabetically-first choice can be surprising; +eg if you have `assets:per:checking 1` and `assets:biz:checking 2` accounts, +`hledger areg checking` would select `assets:biz:checking 2`. +It's just a convenience to save typing, so if in doubt, write the full account name, +or a distinctive substring that matches uniquely. Transactions involving subaccounts of this account will also be shown. `aregister` ignores depth limits, so its final total will always match