about summary refs log tree commit diff
path: root/Completion/User/_configure
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_configure')
-rw-r--r--Completion/User/_configure19
1 files changed, 8 insertions, 11 deletions
diff --git a/Completion/User/_configure b/Completion/User/_configure
index de8d5fba5..e66e06082 100644
--- a/Completion/User/_configure
+++ b/Completion/User/_configure
@@ -1,12 +1,9 @@
-#defcomp configure
+#compdef configure
 
-if [[ $PREFIX = *=* ]]; then
-  # Complete filenames after e.g. --prefix=
-  IPREFIX=${PREFIX%%=*}=
-  PREFIX=${PREFIX#*=}
-  complist -f
-else
-  # Generate a list of options from configure --help
-  complist -s '$($COMMAND --help |
-  sed -n -e '\''s/^ *\(--[-a-z0-9]*\)[    =,].*$/\1/p'\'')'
-fi
+_arguments -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
+              -s '((#s)--disable- --enable-
+	           (#s)--enable- --disable-
+		   (#s)--with- --without-
+		   (#s)--without- --with-)' \
+	      '*=(E|)PREFIX*:prefix directory:_files -/' \
+              '*=PROGRAM*:program:_command_names -e'