From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4434 invoked from network); 1 Jun 2001 14:21:46 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Jun 2001 14:21:46 -0000 Received: (qmail 6363 invoked by alias); 1 Jun 2001 14:21:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14659 Received: (qmail 6348 invoked from network); 1 Jun 2001 14:21:36 -0000 From: Sven Wischnowsky Date: Fri, 1 Jun 2001 16:20:38 +0200 (MET DST) Message-Id: <200106011420.QAA15213@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: _man igores global matchers In-Reply-To: <1010601135709.ZM19655@candle.brasslantern.com> Bart Schaefer wrote: > On Jun 1, 1:40pm, Sven Wischnowsky wrote: > } Subject: Re: _man igores global matchers > } > } Bart Schaefer wrote: > } > } This uses _path_files' builtin compfiles to try to get smarter glob > } patterns with respect to the matchers in use. > > Except that it doesn't appear to reference the global $_matcher anywhere? > How does "the matcher in use" ever get to _man_pages ? > > Perhaps this: > > } _wanted manuals expl 'manual page' _man_pages > > Should be: > > _wanted manuals expl 'manual page' _man_pages -M "$_matcher" > > ? Or am I missing something obvious? It's added automatically in _description, called from _wanted. That's actually the main reason for putting that code into a separate function (that together with laziness). But now that you remind me... the expl array may contain more than one -M option, so the code that extracts the matchers should look like: zparseopts -E M+:=matcher if (( $#matcher )); then matcher=( ${matcher:#-M} ) matcher="$matcher" else matcher= fi Btw, I'm leaving till Wednesday now, so won't be able to commit this (or any changes for the disown stuff). Have fun... Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de