diff --git a/completions/vncviewer b/completions/vncviewer index 8b9a039c3aa..cc5654e4606 100644 --- a/completions/vncviewer +++ b/completions/vncviewer @@ -83,13 +83,14 @@ _comp_cmd_xvnc4viewer() WMDecorationWidth ZlibLevel) [[ $cur == --* ]] && dash=-- || dash=- - local IFS=$' \t\n' reset=$(shopt -p nocasematch) - shopt -s nocasematch - local option - COMPREPLY=($(for option in "${options[@]}"; do - [[ $dash$option == "$cur"* ]] && printf '%s\n' "$dash$option" - done)) - $reset + local IFS=$' \t\n' + COMPREPLY=($( + shopt -s nocasematch + local option + for option in "${options[@]}"; do + [[ $dash$option == "$cur"* ]] && printf '%s\n' "$dash$option" + done + )) else _comp_compgen_known_hosts -- "$cur" fi