Simplified yq usage

This commit is contained in:
Mike Farah
2022-01-28 12:45:43 +11:00
parent e84a50db2e
commit 9896245f71
44 changed files with 515 additions and 316 deletions
+6 -6
View File
@@ -13,7 +13,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval 'sort_by(.a)' sample.yml
yq 'sort_by(.a)' sample.yml
```
will output
```yaml
@@ -32,7 +32,7 @@ cool:
```
then
```bash
yq eval '.cool |= sort_by(.a)' sample.yml
yq '.cool |= sort_by(.a)' sample.yml
```
will output
```yaml
@@ -54,7 +54,7 @@ cool:
```
then
```bash
yq eval '.cool |= sort_by(keys | .[0])' sample.yml
yq '.cool |= sort_by(keys | .[0])' sample.yml
```
will output
```yaml
@@ -80,7 +80,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval 'sort_by(.a)' sample.yml
yq 'sort_by(.a)' sample.yml
```
will output
```yaml
@@ -103,7 +103,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval 'sort_by(.a)' sample.yml
yq 'sort_by(.a)' sample.yml
```
will output
```yaml
@@ -125,7 +125,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval 'sort' sample.yml
yq 'sort' sample.yml
```
will output
```yaml