From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19901 invoked from network); 9 Jun 2004 09:52:36 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 9 Jun 2004 09:52:36 -0000 Received: (qmail 11686 invoked from network); 9 Jun 2004 09:52:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jun 2004 09:52:23 -0000 Received: (qmail 23802 invoked by alias); 9 Jun 2004 09:52:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20033 Received: (qmail 23792 invoked from network); 9 Jun 2004 09:52:12 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 9 Jun 2004 09:52:09 -0000 Received: (qmail 11258 invoked from network); 9 Jun 2004 09:52:08 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 9 Jun 2004 09:52:07 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i599pfv18724 for ; Wed, 9 Jun 2004 09:51:41 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id ; Wed, 9 Jun 2004 10:51:05 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 9 Jun 2004 10:54:32 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (Postfix) with ESMTP id F17366E0205; Wed, 9 Jun 2004 10:51:38 +0100 (BST) Received: from csr.com (pws@localhost) by news01.csr.com (8.12.10/8.12.10/Submit) with ESMTP id i599pcgE022261; Wed, 9 Jun 2004 10:51:38 +0100 Message-Id: <200406090951.i599pcgE022261@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Bill Allombert Cc: 252233@bugs.debian.org, zsh-workers@sunsite.dk Subject: Re: Bug#252233: zsh: filename completion after long options like --foo= In-reply-to: "Bill Allombert"'s message of "Wed, 02 Jun 2004 23:50:18 +0200." <20040602215018.GB5026@seventeen> Date: Wed, 09 Jun 2004 10:51:38 +0100 From: Peter Stephenson X-OriginalArrivalTime: 09 Jun 2004 09:54:32.0896 (UTC) FILETIME=[C3BDF400:01C44E07] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Bill Allombert wrote: > On Wed, Jun 02, 2004 at 05:19:53PM -0400, Clint Adams wrote: > > > I can reproduce the problem with a standard configure file: > > > If a package use gettext (I tried with lostirc), configure says: > > > ./configure --help > > > ... > > > --with-libintl-prefix[=DIR] search for libintl in DIR/include and > > > DIR/lib > > > ... > > > but ./configure --with-libintl-prefix= won't complete on directory. > > > > So, if you remove the brackets from that line in ./configure, it works. > > Yes, but it is highly impractical in this particular case since this > text come from gettext files /usr/share/aclocal/lib-link.m4 and > /usr/share/aclocal/lib-prefix.m4, just grep for "search for". > > [] are used to denote optionnal arguments in the help messages. I don't think editing configure is really an option... Does the following help? Calling the code obscure would be an insult to some perfectly charming obscure features of other languages, and I don't have a suitable package to test, but in the in the listing for zsh's configure it seemed to be doing the right thing for --with-PACKAGE=[ARG]. In case the lines get rewrapped, the change is the addition of an extra ${(@) near the start of the first altered line, and the addition of //\[=/=} near the end of the second. Index: Completion/Base/Utility/_arguments =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v retrieving revision 1.15 diff -u -r1.15 _arguments --- Completion/Base/Utility/_arguments 5 Jun 2003 09:51:32 -0000 1.15 +++ Completion/Base/Utility/_arguments 9 Jun 2004 09:47:25 -0000 @@ -67,9 +67,9 @@ # those hyphens and anything from the space or tab after the # option up to the end. - lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(_call_program options ${~words[1]} --help 2>&1)//\[--/ + lopts=("--${(@)${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(_call_program options ${~words[1]} --help 2>&1)//\[--/ --}:#[ ]#-*}//,/ -}}:#[ ]#--*}#*--}%%[] ]*}:#}") +}}:#[ ]#--*}#*--}%%[] ]*}:#}//\[=/=}") # Remove options also described by user-defined specs. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************