Hi!
Lets say that I have a group of accounts under assets that I want to declare as 'cash'.
For example, they are described by the regex "assets:BANKNAME:account[123]"
Their parent account, "assets:BANKNAME", is always empty. Child subaccounts come and go with some frequency (a couple of times a year).
I am also using "hledger accounts" as an auditing tool to spot new/unexpected/misspelled accounts - i dump the output to a file under version control which immediately alerts me about new accounts I might've introduced by mistake.
Now, the actual problem. If I want to declare subaccounts of assets:BANKNAME as cash, I could make this declaration and include in all my (yearly) hledger files:
account assets:BANKNAME ; type C
Unfortunately, this causes "assets:BANKNAME" to now appear in the output of "hledger accounts" for all the journal files this is included in -- even those that don't mention these accounts at all.
Default account type assignment is done via regex. Is there a way to do the same: declare a regex for accounts that would get "CASH" type, without actually declaring the accounts themselves via "account" declaration?