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

Ville Skyttä ville.skytta at iki.fi
Mon Dec 28 20:40:43 UTC 2009


The following commit has been merged in the master branch:
commit f8a2d6778339f344460ab86bf4bbe6235e88ccec
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Dec 28 22:37:40 2009 +0200

    Add fusermount completion.

diff --git a/CHANGES b/CHANGES
index 7d4fd34..bdaf8da 100644
--- a/CHANGES
+++ b/CHANGES
@@ -29,7 +29,8 @@ bash-completion (2.x)
     mysqladmin, rsync, screen, service, scp, ssh, sshfs, update-alternatives,
     vncviewer, and general hostname completions.
   * Add abook and wtf completion, based on work by Raphaël Droz.
-  * Add jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200 completions.
+  * Add fusermount, jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200
+    completions.
   * Don't overwrite other host completions when completing from multiple
     SSH known hosts files.
   * Speed up installed rpm package completion on SUSE, based on work by
diff --git a/Makefile.am b/Makefile.am
index af557c0..95cd96c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,6 +38,7 @@ bashcomp_DATA = contrib/abook \
 		contrib/dsniff \
 		contrib/findutils \
 		contrib/freeciv \
+		contrib/fuse \
 		contrib/gcc \
 		contrib/gcl \
 		contrib/gdb \
diff --git a/contrib/fuse b/contrib/fuse
new file mode 100644
index 0000000..9d63112
--- /dev/null
+++ b/contrib/fuse
@@ -0,0 +1,35 @@
+# bash completion for fuse
+
+have fusermount &&
+_fusermount()
+{
+    COMPREPLY=()
+    local cur=`_get_cword` prev=`_get_pword`
+
+    case "$prev" in
+        -h|-V|-o)
+            return 0
+            ;;
+        -u)
+            COMPREPLY=( $( compgen -W "$( awk \
+                '{ if ($3 ~ /^fuse\./) print $2 }' /etc/mtab 2>/dev/null )" \
+                -- "$cur" ) )
+            return 0
+            ;;
+    esac
+
+    if [[ "$cur" == -* ]] ; then
+        COMPREPLY=( $( compgen -W '-h -V -o -u -q -z' -- "$cur" ) )
+    else
+        _filedir -d
+    fi
+} &&
+complete -F _fusermount -o filenames fusermount
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh

-- 
bash-completion



More information about the Bash-completion-commits mailing list