Assuming the following test file:
$ cat >foo.yaml<<EOT
value: &value-pointer the value
pointer: *value-pointer
EOT
With previous versions of yq, we'd see the expected behaviour:
$ yq r foo.yaml value
the value
$ yq r foo.yaml pointer
the value
However, with yq version 3.0.1:
$ yq r foo.yaml value
the value
$ yq r foo.yaml pointer
*value-pointer
Oddly, this works in JSON mode:
$ yq -j r foo.yaml pointer
"the value"
Sounds like this is related to #339.
Nice pick up - will have a fix in the next release
Fixed in https://github.com/mikefarah/yq/releases/tag/3.1.0 see https://mikefarah.gitbook.io/yq/commands/read#exploding-anchors :)
Thanks @mikefarah ! :smile: