diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-02-16 15:02:03 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-02-16 15:02:03 +0000 |
commit | 9d43d061e186b91a3b3374ea983a56aa699211a5 (patch) | |
tree | 02875b93d7d0c3b7d5390abef940df01337c686c | |
parent | 1f4fa4c02df2cdced081008c8d91c442b040dbc8 (diff) | |
download | zsh-9d43d061e186b91a3b3374ea983a56aa699211a5.tar.gz zsh-9d43d061e186b91a3b3374ea983a56aa699211a5.tar.xz zsh-9d43d061e186b91a3b3374ea983a56aa699211a5.zip |
23182: _arguments problem with --with-foo[=BAR] specifiers
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Base/Utility/_arguments | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index d01e7d93b..f98c24969 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-16 Peter Stephenson <pws@csr.com> + + * 23182: Completion/Base/Utility/_arguments: handle + ./configure --help output "--with-foo[=BAR]" by + using "=-" specifier. + 2007-02-14 Clint Adams <clint@zsh.org> * 23178: David Riebenbauer: Completion/Debian/Command/_make-kpkg: diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments index dacc19890..d1aafd79a 100644 --- a/Completion/Base/Utility/_arguments +++ b/Completion/Base/Utility/_arguments @@ -217,7 +217,11 @@ if (( long )); then else odescr= fi - opt2=${${opt%%\[\=*}//[^a-zA-Z0-9-]}=${dir}${odescr} + if [[ $opt = (#b)(*)\[\=* ]]; then + opt2=${${match[1]}//[^a-zA-Z0-9-]}=-${dir}${odescr} + else + opt2=${${opt}//[^a-zA-Z0-9-]}=${dir}${odescr} + fi if [[ "$descr" = :\=* ]]; then cache+=( "${opt2}::${(L)${opt%\]}#*\=}: " ) elif [[ "$descr" = ::* ]]; then |