Skip to content

Commit

Permalink
perf(vncviewer): set nocasematch inside subshell
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga authored and scop committed Jan 3, 2024
1 parent 6dab756 commit 5ed0020
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions completions/vncviewer
Expand Up @@ -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
Expand Down

0 comments on commit 5ed0020

Please sign in to comment.