mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Recurse doc problem
This commit is contained in:
@@ -75,6 +75,11 @@ yq '[... | {"p": path | join("."), "isKey": is_key, "hc": headComment, "lc": lin
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
- p: ""
|
||||
isKey: false
|
||||
hc: ""
|
||||
lc: ""
|
||||
fc: ""
|
||||
- p: ""
|
||||
isKey: false
|
||||
hc: ""
|
||||
@@ -135,6 +140,11 @@ yq '[... | {"p": path | join("."), "isKey": is_key, "hc": headComment, "lc": lin
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
- p: ""
|
||||
isKey: false
|
||||
hc: ""
|
||||
lc: ""
|
||||
fc: ""
|
||||
- p: ""
|
||||
isKey: false
|
||||
hc: ""
|
||||
@@ -259,8 +269,6 @@ yq '... comments=""' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
# hi
|
||||
|
||||
a: cat
|
||||
b:
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ yq '..' sample.yml
|
||||
will output
|
||||
```yaml
|
||||
a: frog
|
||||
a: frog
|
||||
frog
|
||||
```
|
||||
|
||||
@@ -92,6 +93,7 @@ yq '...' sample.yml
|
||||
will output
|
||||
```yaml
|
||||
a: frog
|
||||
a: frog
|
||||
a
|
||||
frog
|
||||
```
|
||||
@@ -109,6 +111,9 @@ yq '[..]' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
- a: &cat
|
||||
c: frog
|
||||
b: *cat
|
||||
- a: &cat
|
||||
c: frog
|
||||
b: *cat
|
||||
|
||||
Reference in New Issue
Block a user