Zsh Mailing List Archive
Messages sorted by:
RE: Matching against file suffix
- X-seq: zsh-workers 10047
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: RE: Matching against file suffix
- Date: Fri, 10 Mar 2000 11:27:05 +0100 (MET)
- In-reply-to: "Andrej Borsenkow"'s message of Fri, 10 Mar 2000 12:57:46 +0300
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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.
> zstyle ':completion:*:complete:cd:*' tag-order local-directories path-direcories
> 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
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by: