Skip to content

Commit

Permalink
Updated documentation to use better quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
campos-ddc committed Aug 23, 2021
1 parent b9e188e commit 0cdd8ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ You can pass any number of patches to be applied, they use the following syntax

Example:
```bash
yaml-patch -f test.yml 'spec.replicas=2'
yaml-patch -f test.yml "spec.replicas=2"
```

### Patch a value inside a single list item:
`<field>.[<position]>.<subfield>=<value>`

Example:
```bash
yaml-patch -f test.yml 'spec.template.containers.[0].image="mycontainer:latest"'
yaml-patch -f test.yml "spec.template.containers.[0].image='mycontainer:latest'"
```

### Patch a value inside all list items:
`<field>.[].<subfield>=<value>`

Example:
```bash
yaml-patch -f test.yml 'spec.template.containers.[].image="mycontainer:latest"'
yaml-patch -f test.yml "spec.template.containers.[].image='mycontainer:latest'"
```

## As a Python library
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ line-length = 120

[tool.poetry]
name = "yaml-patch"
version = "0.2.0"
version = "0.2.1"
description = "Patch yaml strings"
readme = "README.md"
authors = ["Diogo de Campos <[email protected]>"]
Expand Down
6 changes: 3 additions & 3 deletions yaml_patch/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
Patch a single value:
<field>.<subfield>=<value>
Example:
yaml-patch -f test.yml 'spec.replicas=2'
yaml-patch -f test.yml "spec.replicas=2"
\b
Patch a value inside a single list item:
<field>.[<position]>.<subfield>=<value>
Example:
yaml-patch -f test.yml 'spec.template.containers.[0].image="mycontainer:latest"'
yaml-patch -f test.yml "spec.template.containers.[0].image='mycontainer:latest'"
\b
Patch a value inside all list items:
<field>.[].<subfield>=<value>
Example:
yaml-patch -f test.yml 'spec.template.containers.[].image="mycontainer:latest"'
yaml-patch -f test.yml "spec.template.containers.[].image='mycontainer:latest'"
""",
)
@click.option(
Expand Down

0 comments on commit 0cdd8ff

Please sign in to comment.