summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_configure
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2026-06-23 02:05:36 +0200
committerOliver Kiddle <opk@zsh.org>2026-06-23 02:05:36 +0200
commit2e0f89f2096ed4057119ff6fb7268c28b2d97dca (patch)
tree25738a8badf5290ff590ab3e8028e17c087341ef /Completion/Unix/Command/_configure
parent54828: handle time arguments in shutdown completion (diff)
downloadzsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar.gz
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar.bz2
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar.lz
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar.xz
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.tar.zst
zsh-2e0f89f2096ed4057119ff6fb7268c28b2d97dca.zip
54844: complete variable assignments with configure
Diffstat (limited to 'Completion/Unix/Command/_configure')
-rw-r--r--Completion/Unix/Command/_configure24
1 files changed, 22 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_configure b/Completion/Unix/Command/_configure
index 3b22b53db..460144ac3 100644
--- a/Completion/Unix/Command/_configure
+++ b/Completion/Unix/Command/_configure
@@ -1,6 +1,11 @@
#compdef configure config.status
-_arguments -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
+local ret=1
+local -a expl suf
+
+[[ -prefix - ]] ||
+ ! zstyle -T ":completion:${curcontext}:options" prefix-needed &&
+ _arguments -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
-s '((#s)--disable- --enable-
(#s)--enable- --disable-
(#s)--with- --without-
@@ -8,4 +13,19 @@ _arguments -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
'*=(E|)PREFIX*:prefix directory:_files -/' \
'*=PROGRAM*:program:_command_names -e' \
'*=NAME*executable*:program:_command_names -e' \
- '*=NAME*:file:_files'
+ '*=NAME*:file:_files' && ret=0
+
+if [[ ! -prefix - ]]; then
+ if [[ "$PREFIX" = *\=* ]]; then
+ compstate[parameter]="${PREFIX%%\=*}"
+ compset -P 1 '*='
+ _value && ret=0
+ else
+ compset -S '=*' || suf=( -S = )
+ _wanted -x variables expl variable compadd $suf \
+ CC CFLAGS CPP CPPFLAGS CXX CXXFLAGS DEFS ERLCFLAGS FCFLAGS \
+ FFLAGS GOFLAGS LDFLAGS LIBS OBJCFLAGS OBJCXXFLAGS && ret=0
+ fi
+fi
+
+return ret