-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable with name "end" #1619
Comments
I'm trying to find a way to permit |
@LukasWallisch - The manual probably omits the restriction because it was not intended to be definitive. In the meantime, the jq FAQ mentions the issue in the |
I think we'll have to change the lexer to produce a separate token type for |
hi @LukasWallisch
|
Hey guy's i'm not sure if this was already reported and i overlooked it.
If a predefined variable is given the name "end", jq throws an error: "syntax error, unexpected end..."
for example:
$ jq -n --arg last "1" '{end: $last}'
works as expected giving:
{ "end": "1" }
but
$ jq -n --arg end "1" '{end: $end}'
gives:
jq: error: syntax error, unexpected end, expecting IDENT or __loc__ (Unix shell quoting issues?) at <top-level>, line 1: {end: $end} jq: 1 compile error
I don't know how complex it would be to fix this, but at least it should be mentioned in the manual I think.
The text was updated successfully, but these errors were encountered: