From 9c31ac48e56c5a399b68a257b5ecf0a14c89deca Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sat, 27 Feb 2021 13:20:41 +0100 Subject: [PATCH] Use mapfile -t to fix the bash autocompletion script. --- scripts/bash-completion.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bash-completion.sh b/scripts/bash-completion.sh index f934a71..47f50cf 100644 --- a/scripts/bash-completion.sh +++ b/scripts/bash-completion.sh @@ -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 }