Skip to content

Commit 5ed0020

Browse files
akinomyogascop
authored andcommitted
perf(vncviewer): set nocasematch inside subshell
1 parent 6dab756 commit 5ed0020

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

completions/vncviewer

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ _comp_cmd_xvnc4viewer()
8383
WMDecorationWidth ZlibLevel)
8484
[[ $cur == --* ]] && dash=-- || dash=-
8585

86-
local IFS=$' \t\n' reset=$(shopt -p nocasematch)
87-
shopt -s nocasematch
88-
local option
89-
COMPREPLY=($(for option in "${options[@]}"; do
90-
[[ $dash$option == "$cur"* ]] && printf '%s\n' "$dash$option"
91-
done))
92-
$reset
86+
local IFS=$' \t\n'
87+
COMPREPLY=($(
88+
shopt -s nocasematch
89+
local option
90+
for option in "${options[@]}"; do
91+
[[ $dash$option == "$cur"* ]] && printf '%s\n' "$dash$option"
92+
done
93+
))
9394
else
9495
_comp_compgen_known_hosts -- "$cur"
9596
fi

0 commit comments

Comments
 (0)