Fix zsh completion with multiple words

`${words[2,-2]}` must not be quoted, otherwise completion for multiple
words (e.g. `shell 3.4.1`) fails.
This commit is contained in:
Daniel Hahler 2014-08-10 17:04:26 +02:00
parent aa62882347
commit 4159055117

View file

@ -11,7 +11,7 @@ _pyenv() {
if [ "${#words}" -eq 2 ]; then if [ "${#words}" -eq 2 ]; then
completions="$(pyenv commands)" completions="$(pyenv commands)"
else else
completions="$(pyenv completions "${words[2,-2]}")" completions="$(pyenv completions ${words[2,-2]})"
fi fi
reply=("${(ps:\n:)completions}") reply=("${(ps:\n:)completions}")