We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi and thanks for yq π I use it every day, it's great!
yq
With multi-document, yq is unable to deselect a document when != operator does not have space around it.
!=
Example:
β― echo -e 'a: 1\n---\na: 2' | yq 'select(.a!=1)' a: 1 --- a: 2
Expected output is a: 2.
a: 2
Spaces around or before works as expected:
β― echo -e 'a: 1\n---\na: 2' | yq 'select(.a != 1)' a: 2 β― echo -e 'a: 1\n---\na: 2' | yq 'select(.a !=1)' a: 2
But not when space after, suggesting it is mixing .a and ! together:
β― echo -e 'a: 1\n---\na: 2' | yq 'select(.a!= 1)' a: 1 --- a: 2
Version of yq: 4.34.1 Operating system: mac Installed via: homebrew
Input Yaml data.yaml:
a: 1 --- a: 2
Command
yq 'select(.a!=1)' data.yaml
Actual behavior
Expected behavior
Additional context Reported in #1377 also. Select with == without spaces works fine, for example select(.a==1).
==
select(.a==1)
I have not looked at the yq code, but I can give the bug a try if I get a pointer for where to look π Assuming this is considered a bug.
The text was updated successfully, but these errors were encountered:
Fixed .a!= parsing issue #1711
71f95ab
That is odd. Looking at the code it thinks that the exclamation mark is part of the property name. Will fix in the next version :)
Sorry, something went wrong.
Also - glad you like yq :)
Fixed in 4.35.2
No branches or pull requests
Hi and thanks for
yq
π I use it every day, it's great!With multi-document,
yq
is unable to deselect a document when!=
operator does not have space around it.Example:
Expected output is
a: 2
.Spaces around or before works as expected:
But not when space after, suggesting it is mixing .a and ! together:
Version of yq: 4.34.1
Operating system: mac
Installed via: homebrew
Input Yaml
data.yaml:
Command
Actual behavior
Expected behavior
Additional context
Reported in #1377 also. Select with
==
without spaces works fine, for exampleselect(.a==1)
.I have not looked at the yq code, but I can give the bug a try if I get a pointer for where to look π Assuming this is considered a bug.
The text was updated successfully, but these errors were encountered: