Use compgen -W instead of grepping $cur in munin-run.

This commit is contained in:
Ville Skyttä 2009-06-09 00:25:06 +03:00
parent 8270b9cf81
commit a2c2227d1d

View File

@ -27,7 +27,8 @@ _munin-run()
COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \
--sconffile --help --debug --version' -- $cur ) )
else
COMPREPLY=( $( command ls /etc/munin/plugins | grep "^$cur" ) )
COMPREPLY=( $( compgen -W '$( command ls /etc/munin/plugins )' \
-- $cur ) )
fi
} &&
complete -F _munin-run munin-run