Just use _known_hosts directly for generic vncviewer.

This commit is contained in:
Ville Skyttä 2009-12-26 14:11:49 +02:00
parent 2c475419b7
commit 76383dd49d

View File

@ -7,7 +7,7 @@ _vncviewer_bootstrap()
case "$(_realcommand vncviewer)" in case "$(_realcommand vncviewer)" in
*xvnc4viewer) fname=_xvnc4viewer ;; *xvnc4viewer) fname=_xvnc4viewer ;;
*tightvncviewer) fname=_tightvncviewer ;; *tightvncviewer) fname=_tightvncviewer ;;
*) fname=_vncviewer ;; *) fname=_known_hosts ;;
esac esac
# Install real completion for subsequent completions # Install real completion for subsequent completions
@ -15,13 +15,7 @@ _vncviewer_bootstrap()
$fname # Generate completions once for now $fname # Generate completions once for now
unset -f _vncviewer_bootstrap unset -f _vncviewer_bootstrap
} && } &&
complete -F _vncviewer_bootstrap vncviewer && complete -F _vncviewer_bootstrap vncviewer
_vncviewer()
{
COMPREPLY=()
local cur=`_get_cword`
_known_hosts_real "$cur"
}
have tightvncviewer && have tightvncviewer &&
_tightvncviewer() _tightvncviewer()