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

Update docs re using values that look like flags

This commit is contained in:
Mike Farah
2017-05-03 10:42:53 +10:00
parent b2a0964de2
commit d07e436065
3 changed files with 8 additions and 8 deletions

View File

@@ -89,14 +89,14 @@ 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:
The flag terminator needs to be used to stop the app from attempting to parse the subsequent arguments as flags:
```
yaml w my.path '"-Dvalue"'
yaml w -- my.path -3
```
will output
```yaml
my:
path: -Dvalue
path: -3
```