;doc:cli: document expr: and queries a little better

This commit is contained in:
Simon Michael 2023-06-08 06:40:16 -10:00
parent 3357c27390
commit 1192d8a057

View File

@ -4566,16 +4566,26 @@ These are most often [account name](#account-names) substrings:
- [Regular expressions](#regular-expressions) are also supported:
`"^expenses\b" "accounts (payable|receivable)"`
`"^expenses\b"`\
`"accounts (payable|receivable)"`
- Add a query type prefix to match other parts of the data:
`date:202312- desc:amazon cur:USD amt:">100" status:`
`date:202312-`\
`status:`\
`desc:amazon`\
`cur:USD`\
`"amt:>0"`
- Add a `not:` prefix to negate a term:
- Add a `not:` prefix to negate:
`not:cur:USD`
- Multiple unlike terms are AND-ed, multiple like terms are OR-ed
`date:2022 desc:amazon desc:amzn`\
(all transactions with "amazon" or "amzn" in description during 2022)
## Query types
Here are the types of query term available.
@ -4623,6 +4633,10 @@ Match secondary dates within the specified period (independent of the `--date2`
**`depth:N`**\
Match (or display, depending on command) accounts at or above this depth.
**`expr:"TERM AND NOT (TERM OR TERM)"`** (eg)\
Match with a boolean combination of queries (which must be enclosed in quotes).
See [Combining query terms](#combining-query-terms) below.
**`note:REGEX`**\
Match transaction [notes](#payee-and-note)
(the part of the description right of `|`, or the whole description if there's no `|`).