From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8324 invoked from network); 7 Oct 2006 09:53:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Oct 2006 09:53:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 6238 invoked from network); 7 Oct 2006 09:53:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 09:53:13 -0000 Received: (qmail 14969 invoked by alias); 7 Oct 2006 09:53:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22837 Received: (qmail 14959 invoked from network); 7 Oct 2006 09:53:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Oct 2006 09:53:10 -0000 Received: (qmail 5989 invoked from network); 7 Oct 2006 09:53:10 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 09:53:08 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 8706970055; Sat, 7 Oct 2006 05:53:01 -0400 (EDT) Date: Sat, 7 Oct 2006 05:53:01 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Cc: Ryo IGARASHI , 377765-forwarded@bugs.debian.org Subject: Re: Bug#377765: zsh: completion of configure script does not handle underscore properly Message-ID: <20061007095301.GA2210@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk, Ryo IGARASHI , 377765-forwarded@bugs.debian.org References: <20060711070135.40826124047@star.phys.s.u-tokyo.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060711070135.40826124047@star.phys.s.u-tokyo.ac.jp> User-Agent: Mutt/1.5.13 (2006-08-11) On Tue, Jul 11, 2006 at 04:01:35PM +0900, Ryo IGARASHI wrote: > When you make a configure option with underscore, completion returns > without underscore. For example, if you have options like: > > $ ./configure --help > ...snip... > Optional Packages: > --with-under_score=DIR path to under_score library > ...snip... > > Then you get the following completion output: > > $ ./configure [TAB] > --with-underscore --without-underscore > > I attached the test case for this bug. This appears to fix that immediate problem. Is there any downside to allowing underscores? Not committing. Index: Completion/Base/Utility/_arguments =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v retrieving revision 1.17 diff -u -r1.17 _arguments --- Completion/Base/Utility/_arguments 27 Sep 2006 16:53:59 -0000 1.17 +++ Completion/Base/Utility/_arguments 7 Oct 2006 09:50:40 -0000 @@ -165,7 +165,7 @@ "${${opt%%\=*}//[^a-zA-Z0-9-]}=:${(L)${opt%\]}#*\=}: " ) done else - tmpo=("${(@)${(@)tmpo%%\=*}//[^a-z0-9-]}") + tmpo=("${(@)${(@)tmpo%%\=*}//[^a-z0-9_-]}") cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" ) fi