diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
commit | 7a0415cfd70a02b2280d27556c6c54cef1c86e1a (patch) | |
tree | 37a88a1c4611ee37f2a3209873fc9a34a2624587 /Completion/User/_configure | |
parent | 904b939cbd81a542303da2c58288b95b153106f5 (diff) | |
download | zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.gz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.xz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.zip |
zsh-3.1.5-pws-11 zsh-3.1.5-pws-11
Diffstat (limited to 'Completion/User/_configure')
-rw-r--r-- | Completion/User/_configure | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/Completion/User/_configure b/Completion/User/_configure index de8d5fba5..050701fac 100644 --- a/Completion/User/_configure +++ b/Completion/User/_configure @@ -1,12 +1,35 @@ #defcomp configure +setopt localoptions extendedglob + if [[ $PREFIX = *=* ]]; then # Complete filenames after e.g. --prefix= IPREFIX=${PREFIX%%=*}= PREFIX=${PREFIX#*=} - complist -f + compgen -f else # Generate a list of options from configure --help - complist -s '$($COMMAND --help | - sed -n -e '\''s/^ *\(--[-a-z0-9]*\)[ =,].*$/\1/p'\'')' + local -a pars + local i + pars=($($words[1] --help | awk '$1 ~ /--[a-z]*.*/ {print $1}')) + for i in $pars + do + case $i in + (--(((en|dis)able-FEATURE)|(with(out|)-PACKAGE))*) + : Skip standard help output + ;; + --enable) + : Skip standard help output + ;; + --*\[=* ) + compadd -M 'r:|-=* r:|=*' -q -S = -- ${i%%\[=*} + ;; + --*=* ) + compadd -M 'r:|-=* r:|=*' -S = -- ${i%%=*} + ;; + * ) + compadd -M 'r:|-=* r:|=*' -- $i + ;; + esac + done fi |