[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 878b9a3e99de30e768378858e817a725c45122b3

Ville Skyttä ville.skytta at iki.fi
Fri Dec 25 10:16:37 UTC 2009


The following commit has been merged in the master branch:
commit 8ab67083022255c49c5ce8956437bf7640329e7b
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Dec 25 12:05:44 2009 +0200

    Drop dead code.
    
    Availability of vncviewer is already checked with "have".

diff --git a/contrib/vncviewer b/contrib/vncviewer
index 1e6e3eb..4826a78 100644
--- a/contrib/vncviewer
+++ b/contrib/vncviewer
@@ -1,20 +1,18 @@
 # bash completion for vncviewer
 
 have vncviewer &&
-_vncviewer_bootstrap() {
+_vncviewer_bootstrap()
+{
     local fname
     case "$(_realcommand vncviewer)" in
-        # If `vncviewer' not installed, default file-dir completion
-        '') _filedir `_get_cword` ;;
         *xvnc4viewer)      fname=_xvnc4viewer    ;;
         *tightvncviewer|*) fname=_tightvncviewer ;;
     esac
-    if [ $fname ]; then
-        # Install real completion for subsequent completions
-        complete -F $fname vncviewer
-        $fname  # Generate completions once for now
-        unset -f _vncviewer_bootstrap
-    fi
+
+    # Install real completion for subsequent completions
+    complete -F $fname vncviewer
+    $fname  # Generate completions once for now
+    unset -f _vncviewer_bootstrap
 } &&
 complete -F _vncviewer_bootstrap vncviewer
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list