Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: PATCH: cleanup in zle_tricky.c



>
> > Do I understand it correctly, that now * is always added if
> GLOB_COMPLETE is
> > set (and never added is GLOB_COMPLETE is unset)? Und is
> globbing ever done
> > at all? I mean, normally, Doc/z*i should be globbed before
> completion even
> > starts - now (with GLOB_COMPLETE) this is the same as Doc/z*i*.
>
> That's not a change (at least it should have behaved like this
> before).

Ahem ... With old good ZSH ...

bor@itsmx1:~/tmp%> echo $ZSH_VERSION
3.1.4
bor@itsmx1:~/tmp%> l foo
a1    b1    x1y
bor@itsmx1:~/tmp%> setopt globcomplete
bor@itsmx1:~/tmp%> l foo/*1TAB
bor@itsmx1:~/tmp%> l foo/a1
foo/a1  foo/b1
bor@itsmx1:~/tmp%> unsetopt globcomplete
bor@itsmx1:~/tmp%> l foo/*1TAB
bor@itsmx1:~/tmp%> l foo/a1 foo/b1

 With old style completion and with new style completion and
> not setting compstate[pattern_match] to anything not starting with a
> `*', glob completion will insert a `*' at the cursor position.
> Globbing is only done if expand-or-complete is used and GLOB_COMPLETE
> is not set, as always.

Sorry? If I can believe manuals (and at least 3.1.4 as you see agrees with
me :-), in case of expand-or-complete globbing is *always* done first. Only
if it fails, we do completion. GLOB_COMPLETE tells a) how to insert matches
and b) what to do if _first_ globbing fails. And I really like this, and I'd
like to have it back :-)

With brand new zsh (without your last patch) with GLOB_COMPLETE:

bor@itsrm2:~/test%> touch cd/{a1,b1,x1y}
bor@itsrm2:~/test%> l cd/*1TAB
bor@itsrm2:~/test%> l cd/a1
a1    b1    x1y

Without GLOB_COMPLETE it simply beeps.

/andrej




Messages sorted by: Reverse Date, Date, Thread, Author