mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
docs(readme): protect parameter expansions
Avoid unwanted word-splitting, including in the working directory path.
This commit is contained in:
parent
3f913afbb9
commit
3ccd32a47e
@ -60,20 +60,20 @@ GO111MODULE=on go get github.com/mikefarah/yq/v3
|
||||
Oneshot use:
|
||||
|
||||
```bash
|
||||
docker run --rm -v ${PWD}:/workdir mikefarah/yq yq [flags] <command> FILE...
|
||||
docker run --rm -v "${PWD}":/workdir mikefarah/yq yq [flags] <command> FILE...
|
||||
```
|
||||
|
||||
Run commands interactively:
|
||||
|
||||
```bash
|
||||
docker run --rm -it -v ${PWD}:/workdir mikefarah/yq sh
|
||||
docker run --rm -it -v "${PWD}":/workdir mikefarah/yq sh
|
||||
```
|
||||
|
||||
It can be useful to have a bash function to avoid typing the whole docker command:
|
||||
|
||||
```bash
|
||||
yq() {
|
||||
docker run --rm -i -v ${PWD}:/workdir mikefarah/yq yq $@
|
||||
docker run --rm -i -v "${PWD}":/workdir mikefarah/yq yq "$@"
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user