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:
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user