Shellcheck compliance

scripts/wireguard/bash-completion
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting)
    * Added double quotes
This commit is contained in:
4s3ti 2021-11-03 14:59:06 +01:00
parent 78810a5781
commit 8bd867894a

View file

@ -9,9 +9,9 @@ _pivpn()
if [ "${#COMP_WORDS[@]}" -eq 2 ] if [ "${#COMP_WORDS[@]}" -eq 2 ]
then then
if [[ ${cur} == -* ]] ; then if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${dashopts}" -- "${cur}") ) COMPREPLY=( "$(compgen -W "${dashopts}" -- "${cur}")" )
else else
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( "$(compgen -W "${opts}" -- "${cur}")" )
fi fi
fi fi
return 0 return 0