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

Prblems with _match and exact matches (was: RE: BUG: RE: What happened to _path_files?)



>
> With my settings it is even worse:
>
> bor@itsrm2:~%> l /t/s/z/f/_<TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions/_<TAB>
> functions/      functions.old/
>

Just to make sure - the actual bug is, that cursor is moved to the end of word
and not to the end of ambiguous part (path_cursor). I just tried with
zsh-3.1.6-pws-3 - and there it is the same ... so, may be, it was there for a
long time.

It happens only if one match is a prefix of another (i.e. one match is exact)
and there is no exact match for suffix. With 3.1.6-pws-3 it does not happen with
_match:

itsrm2% l /t/s/z/f*/_<TAB>
itsrm2% l /tools/share/zsh/functions<CURSOR HERE>/_
functions/      functions.old/

but with 3.1.6-pws-6 + all current patches:

or@itsrm2:~%> l /t/s/z/f*/_<TAB>

just beeps.

If suffix is exact, that works as expected:

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
a     acc

/home/bor/test/lss:
a     acc

bor@itsrm2:~/test%> l /h/b/t/l/a<TAB>
bor@itsrm2:~/test%> l /home/bor/test/ls<CURSOR HERE>/a
ls/   lss/

It still works even in this case:

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
ab     acc

/home/bor/test/lss:
a     acc

But not in this

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
ab     acc

/home/bor/test/lss:
ab     acc

My setings in ~/.zshrc are:

ompconf completer=_oldlist:_complete:_match
compconf match_original=yes
compconf match_insert=unambig
compconf path_cursor=yes
compconf oldlist_list=_match
LS_COLORS=
SELECTMIN=0
setopt cdablevars
setopt extendedhistory
setopt extendedglob
setopt histexpiredupsfirst
setopt histignorealldups
setopt histignoredups
setopt histreduceblanks
setopt histsavenodups
setopt ignoreeof
setopt nobanghist
setopt nolistambiguous
setopt nolistbeep

/andrej



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