Use mapfile -t to fix the bash autocompletion script.
This commit is contained in:
parent
f50889ba8b
commit
9c31ac48e5
|
@ -5,9 +5,9 @@ _ybconAutoComplete() {
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
current="${COMP_WORDS[COMP_CWORD]}"
|
current="${COMP_WORDS[COMP_CWORD]}"
|
||||||
previous="${COMP_WORDS[COMP_CWORD-1]}"
|
previous="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
options='-h -p --help --version --printresult'
|
options='-h -p --help --printresult --version'
|
||||||
if [[ "${current}" == -* ]]; then
|
if [[ "${current}" == -* ]]; then
|
||||||
COMPREPLY=("$(compgen -W "$options" -- "$current")")
|
mapfile -t COMPREPLY <<< "$(compgen -W "$options" -- "$current") "
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue