Skip to content

Commit 3e193ed

Browse files
committed
xvnc4viewer: code cleanups
1 parent d31f2c9 commit 3e193ed

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

completions/vncviewer

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,24 @@ complete -F _tightvncviewer tightvncviewer
5252

5353
# NOTE: - VNC Viewer options are case insensitive.
5454
# Preferred case is taken from -help.
55-
# - Both single dash (-) and double dash (--) are allowed as option prefix
5655
_xvnc4viewer()
5756
{
5857
local cur prev words cword
5958
_init_completion || return
6059

61-
# Convert double dash to single dash
62-
case ${prev/#--/-} in
60+
# Both single dash (-) and double dash (--) are allowed as option prefix
61+
local opt=${prev/#--/-}
62+
case ${opt,,} in
6363
# -passwd, -PasswordFile
64-
-[pP][aA][sS][sS][wW][dD]|-[pP][aA][sS][sS][wW][oO][rR][dD][fF][iI][lL][eE])
64+
-passwd|-passwordfile)
6565
_filedir
6666
return
6767
;;
68-
# -PreferredEncoding
69-
-[pP][rR][eE][fF][eE][rR][rR][eE][dD][eE][nN][cC][oO][dD][iI][nN][gG])
68+
-preferredencoding)
7069
COMPREPLY=( $(compgen -W 'zrle hextile raw' -- "$cur") )
7170
return
7271
;;
73-
# -via
74-
-[vV][iI][aA])
72+
-via)
7573
_known_hosts_real -- "$cur"
7674
return
7775
;;

0 commit comments

Comments
 (0)