Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: noglob and _match
- X-seq: zsh-workers 12363
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: RE: noglob and _match
- Date: Tue, 25 Jul 2000 09:23:31 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Tue, 25 Jul 2000 11:09:58 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> > Andrej Borsenkow wrote:
> >
> > > bor@itsrm2% noglob ls *TAB
> > >
> > > bor@itsrm2% noglob ls Brodsky/
> > > Completing file
> > > Brodsky/ addrbook.d/ dikz/ observe/ test/
> > > .....
> > >
> > > Is it correct in this case? I suspect, the same aplies to _expand as
> > > well.
> >
> > Why not? I mean: you explicitly requested completion, so the
> > completion system *must* think that you know what you're doing.
> >
>
> In this case I want to list all files that start with `*' :-)))
Ah, right, sorry, stupid me.
Ok, first, with a completer with _match after _complete (where it
belongs) and files starting with a `*', `ls *<TAB>' *does* give me
only the files matching `\**' as possible completions. If I have
_expand in the completer (before _complete, of course), that takes
precedence and I get the possible expansions in a menu completion.
But even for _expand it can be fixed, of course:
zstyle -e :completion::::: completer \
'if [[ $words[1] = noglob ]]; then
reply=(_complete)
else
reply=(_expand _complete _match)
fi'
And because of this possibility and because being able to selectively
expand glob patterns for noglob I wouldn't like to have that
changed. Especially because it would then probably be harder or even
impossible to get the current behaviour by setting some styles.
Except, of course, we add yet another style that says if it should
behave as it does now or in the way you want it.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author