From 3ccd32a47e54ebcb96223e2f40763621470dc01a Mon Sep 17 00:00:00 2001 From: "M. Minot" <36635838+mminot-yseop@users.noreply.github.com> Date: Fri, 17 Apr 2020 14:46:20 +0200 Subject: [PATCH] docs(readme): protect parameter expansions Avoid unwanted word-splitting, including in the working directory path. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 91028a01..a6eab9d0 100644 --- a/README.md +++ b/README.md @@ -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] FILE... +docker run --rm -v "${PWD}":/workdir mikefarah/yq yq [flags] 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 "$@" } ```