Consume error messages in configure completion (LP: #223882)

This commit is contained in:
Mika Fischer 2009-01-07 19:38:58 +00:00 committed by James Westby
parent 4b048477fd
commit 9f536f022c
2 changed files with 4 additions and 2 deletions

View File

@ -4997,10 +4997,10 @@ _configure_func()
[[ "$cur" != -* ]] && return 0
if [ -n "$COMP_CONFIGURE_HINTS" ]; then
COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' | grep ^$cur ) )
COMPREPLY=( $( $1 --help 2>&1 | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' | grep ^$cur ) )
else
COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' | grep ^$cur ) )
COMPREPLY=( $( $1 --help 2>&1 | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' | grep ^$cur ) )
fi
}
complete -F _configure_func $default configure

2
debian/changelog vendored
View File

@ -60,6 +60,8 @@ bash-completion (200811xx) UNRELEASED; urgency=low
- fixed typo in the long description
* debian/install:
- correctly install contrib/* under /etc/bash_completion.d/
* Consume error messages in configure completion (LP: #223882)
(Mika Fischer)
-- David Paleino <d.paleino@gmail.com> Fri, 19 Dec 2008 21:59:29 +0100