zsh-workers
 help / color / mirror / code / Atom feed
* Re: noglob and _match
@ 2000-07-25  6:50 Sven Wischnowsky
  2000-07-25  7:09 ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-07-25  6:50 UTC (permalink / raw)
  To: zsh-workers


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.

And it's pretty damn useful, I'd say. *Especially* with noglob (and
even more if that noglob is hidden in an alias).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: noglob and _match
  2000-07-25  6:50 noglob and _match Sven Wischnowsky
@ 2000-07-25  7:09 ` Andrej Borsenkow
  0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2000-07-25  7:09 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> 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 `*' :-))) I expect
from completion to list *real* arguments. It is the same as listing
shell functions as possible command completion after sudo. Yes, I
requested completion - but I never requested to ignore noglob. Exaclty,
because I used it, completion system *must* think I know what I'm doing.

> And it's pretty damn useful, I'd say. *Especially* with noglob (and
> even more if that noglob is hidden in an alias).
>

I think, it is a matter of personal preference ... what about - first
try with noglob respected, second not (something in the line with
fignore or ingnored-patterns). With two different tags for both? That is
probably not so easy I'm afraid.

-andrej


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: noglob and _match
@ 2000-07-25  7:23 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-07-25  7:23 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* noglob and _match
@ 2000-07-25  6:01 Andrej Borsenkow
  0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2000-07-25  6:01 UTC (permalink / raw)
  To: ZSH workers mailing list

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.

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-07-25  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-25  6:50 noglob and _match Sven Wischnowsky
2000-07-25  7:09 ` Andrej Borsenkow
  -- strict thread matches above, loose matches on Subject: below --
2000-07-25  7:23 Sven Wischnowsky
2000-07-25  6:01 Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).