hledger/hledger-lib/Hledger
Stephen Morgan 74f0f37fb3 imp: queries: Allow regular expression depth queries
Previously depth-limiting was universal across all accounts, e.g. all
accounts are clipped to depth 2. However, sometimes you want certain
accounts clipped to a different depth than others, e.g. all expenses to
depth 3, while all assets to depth 2. This commit enables depth-limiting
to optionally include a regular expression, which limits the accounts it
applies to.

More than one depth limit can be passed, and they are applied to each
account name by the following rules:
- If one or more regular-expression depth limit applies, use the
  most specific one
- If no regular-expression depth limits apply, and a flat depth limit is
  supplied, use that
- Otherwise, do not do any depth limiting

For example, this will clip all accounts matching "assets" to depth 3,
all accounts matching "expenses" to depth 2, and all other accounts to
depth 1.
--depth assets=3 --depth expenses=2 --depth 1
2024-12-03 08:33:21 -10:00
..
Data imp: queries: Allow regular expression depth queries 2024-12-03 08:33:21 -10:00
Read imp:print: clean up special tags; show them more often with --verbose-tags 2024-11-16 14:40:03 -10:00
Reports imp: queries: Allow regular expression depth queries 2024-12-03 08:33:21 -10:00
Utils dev: Hledger.Utils.IO: cleanup 2024-11-02 12:59:44 -10:00
Write imp:print:beancount output: more robust account/commodity encoding 2024-11-07 01:28:31 -10:00
Data.hs lib: add Hledger.Data.Currency, currencySymbolToCode, currencyCodeToSymbol 2024-10-11 14:56:03 -10:00
Query.hs imp: queries: Allow regular expression depth queries 2024-12-03 08:33:21 -10:00
Read.hs dev: clarify how readJournalFiles defers checks, and use a dedicated flag 2024-05-02 21:36:32 -10:00
Reports.hs cln: tests: Remove test and tests, which are just aliases for testCase 2021-08-30 16:32:19 -10:00
Utils.hs dev: fix warnings with ghc 9.10 / base 4.20 2024-09-30 17:20:13 -10:00