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

Guillaume Rousse guillomovitch at zarb.org
Mon Apr 19 18:48:07 UTC 2010


The following commit has been merged in the master branch:
commit 08e7a2cbfd67b9b52d0aa25c62ad071854aafd24
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date:   Mon Apr 19 20:47:50 2010 +0200

    initial import

diff --git a/Makefile.am b/Makefile.am
index 609ef8c..a5e58a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,6 +79,7 @@ bashcomp_DATA = contrib/abook \
 		contrib/mc \
 		contrib/mcrypt \
 		contrib/mdadm \
+		contrib/medusa \
 		contrib/minicom \
 		contrib/mkinitrd \
 		contrib/monodevelop \
diff --git a/contrib/medusa b/contrib/medusa
new file mode 100644
index 0000000..d8dcfe4
--- /dev/null
+++ b/contrib/medusa
@@ -0,0 +1,41 @@
+# bash completion for medusa
+
+have medusa &&
+_medusa()
+{
+    local cur prev
+
+    COMPREPLY=()
+    cur=`_get_cword`
+    prev=`_get_pword`
+
+    case $prev in
+        -h)
+            _known_hosts_real "$cur"
+            return 0
+            ;;
+        -H|-U|-P|-C|-O)
+            _filedir
+            return 0
+            ;;
+        -M)
+            COMPREPLY=( $( compgen -W "$(medusa -d | awk '/^ +\+/ {print $2}' \
+                | sed -e 's/\.mod$//')" ) )
+            return 0
+            ;;
+    esac
+
+    if [[ "$cur" == -* ]]; then
+        COMPREPLY=( $( compgen -W '-h -H -u -U -p -P -C -O -e -M -m -d -n -s \
+            -g -r -R -t -T -L -f -F -b -q -v -w -V -Z' -- "$cur" ) )
+    fi
+} &&
+complete -F _medusa medusa
+
+# 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