;doc:queries: edits
This commit is contained in:
parent
2f479fc931
commit
0d7daffad8
@ -4765,17 +4765,22 @@ Most hledger commands accept optional query arguments to restrict their scope.
|
|||||||
The syntax is as follows:
|
The syntax is as follows:
|
||||||
|
|
||||||
- Zero or more space-separated query terms.
|
- Zero or more space-separated query terms.
|
||||||
These are most often [account name](#account-names) substrings:
|
By default these are interpreted as case-insensitive [account name](#account-names) substrings:
|
||||||
|
|
||||||
`utilities food:groceries`
|
`car:fuel`
|
||||||
|
`dining groceries`
|
||||||
|
|
||||||
- Terms with spaces or other [special characters](#special-characters) should be enclosed in quotes:
|
- Patterns containing spaces or other [special characters](#special-characters) must be enclosed in quotes:
|
||||||
|
|
||||||
`"personal care"`
|
`"personal care"`
|
||||||
|
|
||||||
- [Regular expressions](#regular-expressions) are also supported:
|
- These patterns are actually [regular expressions](#regular-expressions),
|
||||||
|
so you can add regular expression metacharacters for more precision
|
||||||
|
(see "Regular expressions" for more details):
|
||||||
|
|
||||||
`"^expenses\b"`\
|
`"^expenses\b"`\
|
||||||
|
`"food$"`\
|
||||||
|
`"fuel|repair"`\
|
||||||
`"accounts (payable|receivable)"`
|
`"accounts (payable|receivable)"`
|
||||||
|
|
||||||
- Add a query type prefix to match other parts of the data:
|
- Add a query type prefix to match other parts of the data:
|
||||||
@ -4784,11 +4789,13 @@ These are most often [account name](#account-names) substrings:
|
|||||||
`status:`\
|
`status:`\
|
||||||
`desc:amazon`\
|
`desc:amazon`\
|
||||||
`cur:USD`\
|
`cur:USD`\
|
||||||
|
`cur:\\$`\
|
||||||
`"amt:>0"`
|
`"amt:>0"`
|
||||||
|
|
||||||
- Add a `not:` prefix to negate:
|
- Add a `not:` prefix to negate:
|
||||||
|
|
||||||
`not:cur:USD`
|
`not:cur:USD`
|
||||||
|
`not:desc:opening|closing`
|
||||||
|
|
||||||
- Multiple unlike terms are AND-ed, multiple like terms are OR-ed
|
- Multiple unlike terms are AND-ed, multiple like terms are OR-ed
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user