1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 07:13:53 -05:00

Merge pull request #1253 from scop/bash-completion-globbing

bash completion: avoid unintentional globbing
This commit is contained in:
Hiroshi SHIBATA
2020-08-09 08:13:04 +09:00
committed by GitHub

View File

@@ -6,8 +6,8 @@ _rbenv() {
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") ) COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
else else
local words=("${COMP_WORDS[@]}") local words=("${COMP_WORDS[@]}")
unset words[0] unset "words[0]"
unset words[$COMP_CWORD] unset "words[$COMP_CWORD]"
local completions=$(rbenv completions "${words[@]}") local completions=$(rbenv completions "${words[@]}")
COMPREPLY=( $(compgen -W "$completions" -- "$word") ) COMPREPLY=( $(compgen -W "$completions" -- "$word") )
fi fi