Use a lazy-quoting @sh encoder (#1548)

* Use a lazy-quoting @sh encoder

* Add internal quoting style switch to @sh

* Add test for stray empty quotes in @sh
This commit is contained in:
Vít Zikmund
2023-02-09 18:15:07 +11:00
committed by GitHub
parent f64f73a0ce
commit 93b7c999be
3 changed files with 53 additions and 8 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ yq '.coolData | @sh' sample.yml
```
will output
```yaml
'strings with spaces and a \'quote\''
strings' with spaces and a '\'quote\'
```
## Decode a base64 encoded string