From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3710 invoked from network); 10 Mar 2000 10:27:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Mar 2000 10:27:41 -0000 Received: (qmail 5438 invoked by alias); 10 Mar 2000 10:27:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10047 Received: (qmail 5425 invoked from network); 10 Mar 2000 10:27:33 -0000 Date: Fri, 10 Mar 2000 11:27:05 +0100 (MET) Message-Id: <200003101027.LAA03185@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Fri, 10 Mar 2000 12:57:46 +0300 Subject: RE: Matching against file suffix Andrej Borsenkow wrote: > > > > > > That reminds me. Matcher-list is way too general - it applies to any completion in any > > > context. And matcher is tried unconditionally, isn't it? > > > > I'm not sure what you mean by `unconditionally' -- I always consider > > the context for which it is set to be a `condition'. > > > > I mean, that if matcher style is set for a tag, it is always used. I have no way to > emulate matcher-list with semantic "try each in turn until you get matches". Yep, see 10027 where I tried to explain why I haven't implemented it. Btw, if someone sees a way around the problems mentioned there, I'd be interested to hear about it. > One more (well, somewhat different) question. I tried to play with tag-order. > Unfortunately, it has one nasty effect - you cannot reject current tag. > > With > > zstyle ':completion:*:complete:cd:*' tag-order local-directories path-direcories > > and > > ./foo1 > foo2 somewhere in $cdpath > > cd fTAB > > will never complete foo2. > > I think, it was discussed at least once, but may be in different context. > > The same is true for example in docs (gunzip). If no *.gz exists but you have a > subdirectory, you will never get a chance to complete other file. > > Or did I miss something? My first reaction was: yes. My second reaction: so what? ;-) Maybe I'm too slow in the brain today, but... what exactly do you want to say? You selected the order explicitly. If you want to see foo2, you have to give the tag in one string (I guess you are aware of that -- just making sure): zstyle ':completion:*:complete:cd:*' tag-order 'local-directories path-direcories' (note the quotes). With gunzip this is slightly different, because we have a default for the order of globbed-files/directories/all-files. Maybe you prefer: zstyle ... tag-order globbed-files all-files Or maybe you want to have a way to switch from one type of matches to the `next'. That would be nice, yes. It's just that nobody didn't find the time to write that yet -- maybe a bindable command, working a bit like _complete_help, gathering possible tags and then selecting one of them... (I haven't missed that yet, that's why I haven't tried to write it). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de