>>>>> Ethan  <[email protected]> writes:

> I think either the two things should be unified or a bigger distinction
> should be drawn between them in the documentation. I spent an awful lot of
> time trying to use has_tag in an automated expression without luck. In
> particular, when I tried:

Query expressions are just a shorthand form for value expressions.  If you
type "ledger query QUERY", it will show you what the equivalent value
expression would be.  An in general, starting a query expression with "expr"
should by-pass the query expression parser, and drop you down into the full
value expression language.

>> = expr has_tag("TAG")
> Error: Invalid token '<end of input>' (wanted ')')

Hmm.. this seems like a bug to me!  Would you mind entering it into Bugzilla?
http://bugs.ledger-cli.org.  Thanks.

> And without expr, it doesn't match anything.

I think %TAG is the query expression form for what you're trying to do.

John

Reply via email to