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
Describe the bug Trying to write an anchor or an alias creates a value wrapped with single quotes, which then cannot be used as anchor or alias.
Command Example1 – writing anchor (&)
yq write -i file.yaml key1 "&myAnchor myValue"
Actual behavior
key1: '&myAnchor myValue'
Expected behavior
key1: &myAnchor myValue
Example2 – writing alias (*)
yq write -i file.yaml key2 *myAlias
key2: '*myAlias'
key2: *myAlias
Example3 – writing a value with spaces – works fine, without wrapping with single quotes
yq write -i file.yaml key3 "multi word value"
key3: multi word value
The text was updated successfully, but these errors were encountered:
I think this would need a separate anchorName flag, setting that would set the anchorName...
yq write -i file.yaml key1 --anchorName="myAnchor" "myValue"
Sorry, something went wrong.
I'll aim to get something in the next release - sorry for the long time to response!
No branches or pull requests
Describe the bug
Trying to write an anchor or an alias creates a value wrapped with single quotes, which then cannot be used as anchor or alias.
Command
Example1 – writing anchor (&)
Actual behavior
Expected behavior
Example2 – writing alias (*)
Actual behavior
Expected behavior
Example3 – writing a value with spaces – works fine, without wrapping with single quotes
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: