The following commit has been merged in the master branch:
commit 2e66656e682a8fc469c9de4c3eaeb61b2c095d33
Author: Ville Skyttä <[email protected]>
Date: Sat Apr 18 22:37:46 2009 +0300
Use compgen -W instead of grepping $cur.
diff --git a/contrib/mplayer b/contrib/mplayer
index 80880b9..e5a6f6e 100644
--- a/contrib/mplayer
+++ b/contrib/mplayer
@@ -7,10 +7,9 @@ have mplayer && {
_mplayer_options_list()
{
cur=${cur%\\}
- COMPREPLY=( $( $1 $2 help 2> /dev/null | \
+ COMPREPLY=( $( compgen -W "$( $1 $2 help 2>/dev/null | \
sed -e '1,/^Available/d' | awk '{print $1}' | \
- sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' | \
- grep "^$cur" ) )
+ sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' )" -- $cur ) )
}
_mplayer()
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits