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

Ville Skyttä ville.skytta at iki.fi
Mon May 25 19:53:57 UTC 2009


The following commit has been merged in the master branch:
commit e9c227d4a695d7075173316d3a6238bdd1b563da
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon May 25 22:53:34 2009 +0300

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

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

-- 
bash-completion



More information about the Bash-completion-commits mailing list