[Bash-completion-commits] [SCM] bash-completion branch, master, updated. a679544447e238e609bd6bf14bd90aff8e07cd63
Ville Skyttä
ville.skytta at iki.fi
Sun May 10 17:27:48 UTC 2009
The following commit has been merged in the master branch:
commit a679544447e238e609bd6bf14bd90aff8e07cd63
Author: Ville Skyttä <ville.skytta at iki.fi>
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
More information about the Bash-completion-commits
mailing list