simonmichael · GitHub

The next step in #217, #1073 etc.: the account directive supports tags, but you can't match on them in queries. This would allow external tools, like charting scripts, to reliably select accounts by their type.

Eg to select asset accounts, something like this:

hledger bal tag=type:A

Possible problems ?

  • Standard tags behaviour is that posting-matching reports will also see tags from the parent transaction, and transaction-matching commands will also see tags from all postings. I'm not sure if this will be a problem.
  • tag=type:VAL is a little clunky and VAL is an infix match so you'd need tag=type:'^A' to be (somewhat) robust
  • you might want to also allow writing the long form Asset for readability, as the account type tag does.

If necessary, a specialised atype: query might be one way to solve these.

Read the original on github.com ↗