Define _tightvncviewer also when (only) vncviewer is available.

This commit is contained in:
Ville Skyttä 2009-12-25 12:14:10 +02:00
parent cffa2db149
commit 878b9a3e99
2 changed files with 7 additions and 5 deletions

View File

@ -25,8 +25,8 @@ bash-completion (2.x)
* Apply pine completion to alpine too. * Apply pine completion to alpine too.
* Remove many unnecessary short option completions where long ones exist. * Remove many unnecessary short option completions where long ones exist.
* Improve configure, cvs, gkrellm, lftp, mdadm, modprobe, mplayer, * Improve configure, cvs, gkrellm, lftp, mdadm, modprobe, mplayer,
mysqladmin, rsync, screen, service, scp, ssh, update-alternatives, and mysqladmin, rsync, screen, service, scp, ssh, update-alternatives,
general hostname completions. vncviewer, and general hostname completions.
* Add abook and wtf completion, based on work by Raphaël Droz. * Add abook and wtf completion, based on work by Raphaël Droz.
* Add jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200 completions. * Add jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200 completions.
* Don't overwrite other host completions when completing from multiple * Don't overwrite other host completions when completing from multiple

View File

@ -16,7 +16,9 @@ _vncviewer_bootstrap()
} && } &&
complete -F _vncviewer_bootstrap vncviewer complete -F _vncviewer_bootstrap vncviewer
have tightvncviewer && # _tightvncviewer is our default in bootstrap above, so always define it
# even if only vncviewer is available.
have vncviewer || have tightvncviewer &&
_tightvncviewer() _tightvncviewer()
{ {
local cur prev local cur prev
@ -51,8 +53,8 @@ _tightvncviewer()
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi
} && }
complete -F _tightvncviewer tightvncviewer have tightvncviewer && complete -F _tightvncviewer tightvncviewer
# NOTE: - VNC Viewer options are case insensitive. # NOTE: - VNC Viewer options are case insensitive.