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

David Paleino d.paleino at gmail.com
Sat Oct 31 21:48:39 UTC 2009


The following commit has been merged in the master branch:
commit b4901c1f6e10d906e2a555dc00c0e8685ede6414
Author: David Paleino <d.paleino at gmail.com>
Date:   Sat Oct 31 22:45:49 2009 +0100

    Added munindoc completion to contrib/munin-node, thanks to Tom Feiner (Debian: #553371)

diff --git a/CHANGES b/CHANGES
index 755aa22..7401b33 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,8 @@ bash-completion (2.x)
   * contrib/munin-node fixed (Debian: #550943)
   * contrib/dpkg fixed -W and --show completing on .?(u)deb's (Debian: #552109)
   * contrib/aptitude: add @(add|remove)-user-tag
+  * Added munindoc completion to contrib/munin-node, thanks to Tom
+    Feiner (Debian: #553371)
 
   [ Ville Skyttä ]
   * Create bz2 dist tarball too.
diff --git a/contrib/munin-node b/contrib/munin-node
index af8225c..42b6bba 100644
--- a/contrib/munin-node
+++ b/contrib/munin-node
@@ -7,7 +7,7 @@ _munin_run()
 
     COMPREPLY=()
     cur=`_get_cword`
-    prev=${COMP_WORDS[COMP_CWORD-1]}
+    prev=`_get_pword`
 
     case $prev in
         --@(config|sconffile))
@@ -30,6 +30,20 @@ _munin_run()
 } &&
 complete -F _munin_run munin-run
 
+have munindoc &&
+_munindoc()
+{
+    local cur prev
+
+    COMPREPLY=()
+    cur=`_get_cword`
+    prev=`_get_pword`
+
+    COMPREPLY=( $( compgen -W '$( command ls /usr/share/munin/plugins )' \
+        -- "$cur" ) )
+} &&
+complete -F _munindoc munindoc
+
 have munin-update &&
 _munin_update()
 {
@@ -37,7 +51,7 @@ _munin_update()
 
     COMPREPLY=()
     cur=`_get_cword`
-    prev=${COMP_WORDS[COMP_CWORD-1]}
+    prev=`_get_pword`
 
     case $prev in
         --config)
@@ -65,7 +79,7 @@ _munin_node_configure()
 
     COMPREPLY=()
     cur=`_get_cword`
-    prev=${COMP_WORDS[COMP_CWORD-1]}
+    prev=`_get_pword`
 
     case $prev in
         --config)

-- 
bash-completion



More information about the Bash-completion-commits mailing list