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

Ville Skyttä ville.skytta at iki.fi
Tue Apr 28 20:45:56 UTC 2009


The following commit has been merged in the master branch:
commit ea2938e4243ecc80b1be0489650fc478ae69193f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Apr 28 23:45:48 2009 +0300

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

diff --git a/bash_completion b/bash_completion
index 428bc8a..36651bb 100644
--- a/bash_completion
+++ b/bash_completion
@@ -3037,10 +3037,10 @@ _make()
 		[ -n "$makef" ] && makef="-f ${makef}"
 		[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
 		
-		COMPREPLY=( $( make -qp $makef $makef_dir 2>/dev/null | \
+		COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \
 					awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
-					{split($1,A,/ /);for(i in A)print A[i]}' | \
-					command grep "^$cur" ))
+					{split($1,A,/ /);for(i in A)print A[i]}' )" \
+					-- $cur ) )
 
 	fi
 } &&

-- 
bash-completion



More information about the Bash-completion-commits mailing list