From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19887 invoked from network); 6 May 2000 18:31:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 May 2000 18:31:19 -0000 Received: (qmail 20085 invoked by alias); 6 May 2000 18:31:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11236 Received: (qmail 20051 invoked from network); 6 May 2000 18:30:57 -0000 From: "Bart Schaefer" Message-Id: <1000506183049.ZM6362@candle.brasslantern.com> Date: Sat, 6 May 2000 18:30:48 +0000 In-Reply-To: <000a01bfb740$081e59e0$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "something wrong with _arguments wordsplitting" (May 6, 1:47pm) References: <000a01bfb740$081e59e0$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "ZSH workers mailing list" Subject: PATCH: Re: something wrong with _arguments wordsplitting MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 6, 1:47pm, Andrej Borsenkow wrote: } Subject: something wrong with _arguments wordsplitting } } bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-st } bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-staticTurn } } Oops! Hmm, may be, there are TABs in between? That does appear to have been it. This should fix it. The comma wasn't necessary in the final pattern any more, was it? All the commas should be zapped by then. Index: Completion/Base/_arguments =================================================================== @@ -60,16 +60,16 @@ # The parameter expansion trickery first gets the lines as separate # array elements. Then we select all lines whose first non-blank # character is a hyphen. Since some commands document more than one - # option per line, separated by commas, we convert commas int + # option per line, separated by commas, we convert commas into # newlines and then split the result again at newlines after joining # the old array elements with newlines between them. Then we select # those elements that start with two hyphens, remove anything up to - # those hyphens and anything from the space or comma after the - # option up to the end. + # 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 options ${~words[1]} --help 2>&1)//\[--/ --}:#[ ]#-*}//,/ -}}:#[ ]#--*}#*--}%%[], ]*}:#}") +}}:#[ ]#--*}#*--}%%[] ]*}:#}") lopts=( "${(@)lopts:#--}" ) # Now remove all ignored options ... -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com