Added support for *=

This commit is contained in:
Mike Farah
2022-01-22 16:40:17 +11:00
parent a6c79f3410
commit 6e33132de9
5 changed files with 35 additions and 8 deletions
+9 -3
View File
@@ -23,13 +23,19 @@ yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' file1.yaml file2.y
```
## Multiply integers
Running
Given a sample.yml file of:
```yaml
a: 3
b: 4
```
then
```bash
yq eval --null-input '3 * 4'
yq eval '.a *= .b' sample.yml
```
will output
```yaml
12
a: 12
b: 4
```
## Merge objects together, returning merged result only