Hi all,
What's the proper way to filter by tag in a value expression passed to --limit?
The manual says this:
%/REGEX/
tag(REGEX)
A regular expression that matches against a transaction’s tags.
But I can't seem to make it work:
Here's test.ledger:
2018-08-21 A
Expenses:XYZ $10
Assets:Stash
; :travel: Finland
2018-08-22 B
Expenses:ABC $3
Assets:Stash
And a command line session:
$ ledger -f test.ledger reg --limit 'tag(/travel/)' # Prints nothing
$ ledger -f test.ledger reg --limit 'account =~ /ABC/' # This works to
filter by account
2018-08-22 B Expenses:ABC $3 $13
$ ledger -f test.ledger reg --limit 'account =~ /ABC/ and tag(/travel/)' #
Nothing
$ ledger -f test.ledger reg '%/travel/' # This works, but not in a --limit
expression
2018-08-21 A Assets:Stash $-10 $-10
I need a --limit expression to combine a tag filter with other more complex
filters (using any(…), for example).
How do I include a tag filter in a --limit expression?
Thanks!
Clément.
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.