summaryrefslogtreecommitdiffstats
path: root/tools/cr
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-24 15:23:24 +0000
committerqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-24 15:23:24 +0000
commit5030babb4f246cf5c52482cd697f9d755d851cbe (patch)
tree61263cdc4813826d79b2c10d6ed78b0bc5ac7b2e /tools/cr
parent843fb4f76789246f410b17fb24966f74e3769c4d (diff)
downloadchromium_src-5030babb4f246cf5c52482cd697f9d755d851cbe.zip
chromium_src-5030babb4f246cf5c52482cd697f9d755d851cbe.tar.gz
chromium_src-5030babb4f246cf5c52482cd697f9d755d851cbe.tar.bz2
Use array to be compatible with zsh.
R=bulach@chromium.org Review URL: https://codereview.chromium.org/144183007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/cr')
-rwxr-xr-xtools/cr/cr-bash-helpers.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/cr/cr-bash-helpers.sh b/tools/cr/cr-bash-helpers.sh
index 03f42cc..f803771 100755
--- a/tools/cr/cr-bash-helpers.sh
+++ b/tools/cr/cr-bash-helpers.sh
@@ -17,12 +17,12 @@ fi
cr_base_dir=$(dirname $(realpath "${BASH_SOURCE:-$0}"))
cr_main="${cr_base_dir}/main.py"
-cr_exec="PYTHONDONTWRITEBYTECODE=1 python ${cr_main}"
+cr_exec=("PYTHONDONTWRITEBYTECODE=1" "python" "${cr_main}")
# The main entry point to the cr tool.
# Invokes the python script with pyc files turned off.
function cr() {
- env $cr_exec "$@"
+ env ${cr_exec[@]} "$@"
}
# Attempts to cd to the root/src of the current client.
@@ -40,7 +40,9 @@ function _cr_complete() {
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local main="python -B "${cr_main}")"
- local completions="$(env COMP_CWORD=${COMP_CWORD} COMP_WORD=${cur} $cr_exec)"
+ local completions="$(env COMP_CWORD=${COMP_CWORD} \
+ COMP_WORD=${cur} \
+ ${cr_exec[@]})"
COMPREPLY=( $(compgen -W "${completions}" -- ${cur}) )
}