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

RE: PATCH: cleanup in zle_tricky.c



> - compstate[pattern_match] is normally set to `*'. If it is set to a
>   string not starting with a star, the code will not automatically
>   insert one at the cursor position.

I don't understand this difference (with globcomplete unset):

bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> l D/z*iTAB
bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> l Doc/z*iTAB
bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> l Doc/zsh.texi

  *really* fine

but

bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> l /u/i/s/*.hTAB
  b-e-e-p

/u/i/s expands to (single) /usr/include/sys - at least, if the last
component is considered directory:

bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> ls -d /usr/include/s*(/)
/usr/include/sys

Another one that puzzled me:

bor@itsrm2:/tools/src/zsh-3.1.5-pws-13/Completion%> cp -rp
{Core,Base,Builtin} ~
/.zsh.d/Completion
cp: Cannot access Builtin: No such file or directory
bor@itsrm2:/tools/src/zsh-3.1.5-pws-13/Completion%> cp -rp
{Core,Base,Builtin} ~ /.zsh.d/Completion

I moved cursor before closing bracket (BuiltinCURSOR}) and pressed TAB -
with the result BEEP (this with GLOB_COMPLETE set). If GLOB_COMPLETE is
unset, I get (after TAB):

bor@itsrm2:/tools/src/zsh-3.1.5-pws-13/Completion%> cp -rp Core Base Builtin
~/
.zsh.d/Completion

Now, the first is correct (I need COMPLETE_IN_WORD for this to work). But
what is the second?

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*.

cheers

/andrej




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