The following commit has been merged in the master branch:
commit 9bac0313da780aa72ed821f63cda28adaf98ef82
Author: Ville Skyttä <[email protected]>
Date:   Sat Apr 18 13:57:36 2009 +0300

    Use compgen -W instead of grepping $cur.

diff --git a/contrib/cowsay b/contrib/cowsay
index d9f8bc4..31682c6 100644
--- a/contrib/cowsay
+++ b/contrib/cowsay
@@ -14,7 +14,8 @@ _cowsay()
 
        case $prev in
                -f)
-                       COMPREPLY=( $( cowsay -l | tail -n +2 | tr " " "\n" | 
grep "^$cur" ) )
+                       COMPREPLY=( $( compgen -W '$( cowsay -l | tail -n +2 \
+                               )' -- $cur ) )
                        return 0
                        ;;
        esac

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to