Use compgen -W instead of grepping $cur in lilo completion.

This commit is contained in:
Ville Skyttä 2009-05-25 22:53:34 +03:00
parent 8ebf982e10
commit e9c227d4a6

View File

@ -6,8 +6,8 @@
have lilo && { have lilo && {
_lilo_labels() _lilo_labels()
{ {
COMPREPLY=( $( awk -F'=' '/label/ {print $2}' \ COMPREPLY=( $( compgen -W "$( awk -F'=' '/label/ {print $2}' \
/etc/lilo.conf | sed -e 's/"//g' | grep "^$cur" ) ) /etc/lilo.conf | sed -e 's/\"//g' )" -- $cur ) )
} }
_lilo() _lilo()