Updating comment op doc

This commit is contained in:
Mike Farah 2021-11-14 11:10:43 +11:00
parent 832db92eb2
commit 3cdbfebe46

View File

@ -139,6 +139,26 @@ will output
welcome! welcome!
``` ```
##
Given a sample.yml file of:
```yaml
# welcome!
---
# bob
a: cat # meow
# have a great day
```
then
```bash
yq eval 'headComment' sample.yml
```
will output
```yaml
welcome!
bob
```
## Get foot comment ## Get foot comment
Given a sample.yml file of: Given a sample.yml file of:
```yaml ```yaml
@ -147,6 +167,7 @@ Given a sample.yml file of:
a: cat # meow a: cat # meow
# have a great day # have a great day
# no really
``` ```
then then
```bash ```bash
@ -155,5 +176,6 @@ yq eval '. | footComment' sample.yml
will output will output
```yaml ```yaml
have a great day have a great day
no really
``` ```