The following commit has been merged in the master branch:
commit a679544447e238e609bd6bf14bd90aff8e07cd63
Author: Ville Skyttä <[email protected]>
Date: Sun May 10 20:27:33 2009 +0300
Use compgen -W in _longopt().
diff --git a/bash_completion b/bash_completion
index 1b2a566..aa4aba3 100644
--- a/bash_completion
+++ b/bash_completion
@@ -4275,9 +4275,9 @@ _longopt()
fi
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
- -e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' | \
- command grep "^$cur" | sort -u ) )
+ COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \
+ -e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' |sort -u )"\
+ -- $cur ) )
elif [[ "$1" == rmdir ]]; then
_filedir -d
else
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits