diff --git a/CHANGES b/CHANGES index 755aa221..7401b332 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 af8225c7..42b6bba3 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)