Use compgen -W instead of grepping $cur in munin-run.
This commit is contained in:
parent
8270b9cf81
commit
a2c2227d1d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user