From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16793 invoked from network); 27 Apr 2000 13:54:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Apr 2000 13:54:59 -0000 Received: (qmail 17883 invoked by alias); 27 Apr 2000 13:54:18 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3043 Received: (qmail 17870 invoked from network); 27 Apr 2000 13:54:18 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: Subject: RE: Q about new completion (how to create several match sets) Date: Thu, 27 Apr 2000 17:51:42 +0400 Message-ID: <000801bfb04f$b836fe60$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal In-reply-to: <200004271105.NAA14323@beta.informatik.hu-berlin.de> > > > In current form _configure completes both --with-option > > and --without-option in one shot. It means, that I always > get at least > > two matches and (in my settings) cursor is placed after > --with so I have > > to use additional keystroke to jump to the end of line. > > Hm, this is ugly, but should it be enough to keep from > supplying match > specs? > No. In this case I obviously do want to use match specs )to be able to complete --w-f-b-c). > > Sure: > > zstyle ':completion:*:*:configure:*' tag-order \ > 'options:-with:with\ options options:-other:other\ options' \ > 'options:-without:without\ options' > zstyle ':completion:*:options-with' ignored-patterns '^--with-*' > zstyle ':completion:*:options-without' ignored-patterns > '^--without-*' > zstyle ':completion:*:options-other' ignored-patterns > '--with(|out)-*' > > (Hmmmmm, tag labels. ;-) > > This says to first complete options two times, once using the tag > `options-with' and once using the tag `options-other'. The > ignored-patterns for these tags then make sure that you don't get the > `--without-*' options. The second value of the tag-order > style says to > complete options using the tag `options-without' and there the > ignored-patterns says that only the `--without-*' options are to be > completed. > No, that's weird. I was able to make it running exactly once - and I have a feeling, this was after cvs update/make/make install in one window, sourcing styles in another one and trying there (that is, with *old* zsh+functions). What I get currently, is bor@itsrm2% cd samba-2.0.7/source bor@itsrm2% ./configure --wi-swTAB bor@itsrm2% cd samba-2.0.7/source bor@itsrm2% ./configure --with-swatdir Completing with options --with-swatdir Completing other options --with-swatdir --without-swatdir with styles bor@itsrm2% zstyle -L zstyle ':completion:*' completer _oldlist _complete _match zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' group-name '' zstyle ':completion:*' ignore-parents parent pwd zstyle ':completion:*' insert-unambiguous true zstyle ':completion:*' list-colors '' zstyle ':completion:*' list-prompt 'Showing %l' zstyle ':completion:*' match-original both zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*' 'r:|[._-]=** r:|=**' zstyle ':completion:*' menu 'select=0' zstyle ':completion:*' original true zstyle ':completion:*' verbose true zstyle ':completion:*' old-list _match zstyle ':completion:*:*:configure:*' tag-order 'options:-with:with\ options options:-other:other\ options' 'options:-without:without\ options' zstyle ':completion:*:options-with' ignored-patterns '^--with-*' zstyle ':completion:*:options-without' ignored-patterns '^--without-*' zstyle ':completion:*:options-other' ignored-patterns '^--with(|out)-*' (I added ``^'' to the last pattern - assuming, it is beginning-of-word anchor) + setopt nolistambiguous in .zshrc > > I'm not completely sure that I know what you mean by `select > either of > them', but of course completing after `--without-' will take the > matches from the second set because in the first one nothing matches, > and then there is _next_tags, bound to ^Xn to go to the next set of > tags in the tag-order style. > Yes, that was it. -andrej