Use mapfile -t to fix the bash autocompletion script.

This commit is contained in:
Username404-59 2021-02-27 13:20:41 +01:00
parent f50889ba8b
commit 9c31ac48e5
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,9 @@ _ybconAutoComplete() {
COMPREPLY=()
current="${COMP_WORDS[COMP_CWORD]}"
previous="${COMP_WORDS[COMP_CWORD-1]}"
options='-h -p --help --version --printresult'
options='-h -p --help --printresult --version'
if [[ "${current}" == -* ]]; then
COMPREPLY=("$(compgen -W "$options" -- "$current")")
mapfile -t COMPREPLY <<< "$(compgen -W "$options" -- "$current") "
return 0
fi
}