MiSawa / xq

Pure rust implementation of jq
MIT License
318 stars 18 forks source link

Fix sh format on array #95

Closed itchyny closed 2 years ago

itchyny commented 2 years ago

This PR fixes the sh format on array.

❯ jq -nr '@sh "\(0, "a b c", [0,null,true,"a b c"])"'
0
'a b c'
0 null true 'a b c'

❯ xq -nr '@sh "\(0, "a b c", [0,null,true,"a b c"])"'
0
'a b c'
'[0,null,true,"a b c"]'

❯ xq --version
xq 0.2.10-7adfc7251091a68a8d0a28360a7ba4a54ef8588e

This is documented in the jq Manual as If the input is an array, the output will be a series of space-separated strings..

MiSawa commented 2 years ago

Awesome, thank you for pointing out the issue and fixing it!