Skip to content

Commit

Permalink
vncviewer: Cleanup shopt use, drop an eval
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 23, 2016
1 parent 47c5c97 commit cfc6212
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions completions/vncviewer
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ _xvnc4viewer()
WMDecorationWidth ZlibLevel )
[[ "$cur" == --* ]] && dash=-- || dash=-

local option oldNoCaseMatch=$(shopt -p nocasematch)
shopt -s nocasematch
local option reset=$( shopt -p nocasematch ); shopt -s nocasematch
COMPREPLY=( $( for option in "${options[@]}"; do
[[ $dash$option == "$cur"* ]] && printf '%s\n' $dash$option
done ) )
eval "$oldNoCaseMatch" 2>/dev/null
$reset
else
_known_hosts_real "$cur"
fi
Expand Down

0 comments on commit cfc6212

Please sign in to comment.