Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with _configure argument autocomplete



On Sun, 13 Dec 2009 20:04:54 -0500
Andrew Ryan <nerdrew@xxxxxxxxx> wrote:
> The mod_wsgi configure script has the following options (taken from
> ./configure -h):
> 
> Optional Packages:
>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>   --with-apxs=NAME        name of the apxs executable [apxs]
>   --with-python=NAME      name of the python executable [python]
> 
> 
> The "--with-python=NAME" option does not autocomplete the path
> following the equal sign.
> 
> Adding the following to the end of _configure makes it autocomplete correctly:
> 
> '*=NAME*:directory:_files -/'

Surely that should be a regular file (if not an executable)?

Index: Completion/Unix/Command/_configure
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_configure,v
retrieving revision 1.2
diff -u -r1.2 _configure
--- Completion/Unix/Command/_configure	13 May 2007 19:49:00 -0000	1.2
+++ Completion/Unix/Command/_configure	14 Dec 2009 20:45:23 -0000
@@ -6,4 +6,6 @@
 		   (#s)--with- --without-
 		   (#s)--without- --with-)' \
 	      '*=(E|)PREFIX*:prefix directory:_files -/' \
-              '*=PROGRAM*:program:_command_names -e'
+              '*=PROGRAM*:program:_command_names -e' \
+	      '*=NAME*executable*:program:_command_names -e' \
+	      '*=NAME*:file:_files'

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author