1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Added doco regarding values starting with hyphens

This commit is contained in:
Mike Farah
2017-05-03 08:11:26 +10:00
parent ec25886528
commit 69e6bb354d
8 changed files with 67 additions and 25 deletions

View File

@@ -86,4 +86,17 @@ b:
And, of course, you can pipe the instructions in using '-':
```bash
cat update_instructions.yaml | yaml w -s - sample.yaml
```
```
### Values starting with a hyphen (or dash)
This needs a bit of trickery so that it won't try to parse the value as a CLI option. Specifically you will need to wrap the value with a single and double quotes:
```
yaml w my.path '"-Dvalue"'
```
will output
```yaml
my:
path: -Dvalue
```