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

General comments on completion



[It started from the example below; but then I realised, it is not a bug - but,
probably, unwanted feature]

bor@itsrm2:/tools/src/zsh-3.1.5-pws-24%> patch -p0 --dry-run <
/a/p/u/z/p/*24/<6909-><TAB>
bor@itsrm2:/tools/src/zsh-3.1.5-pws-24%> patch -p0 --dry-run < /archive/pub/unix
/zsh/patches/pws-24/69<TAB>
6926   6933   6936   6937   6939   6941   6945   6946   6947
bor@itsrm2:/tools/src/zsh-3.1.5-pws-24%> patch -p0 --dry-run < /archive/pub/unix
/zsh/patches/pws-24/6901
6901   6903   6908   6933   6937   6941   6946
6902   6904   6926   6936   6939   6945   6947

Actually, when writing this I realised what happens ... instead of using old
list completion builds new one. This is obviously the result of me setting
compconf match_insert=unambig ... that makes completion to "forget" about
previously generated list ... No, this can't be right.

I am speaking as an illiterate user now. After I pressed TAB the first time, I
got a list of matches. And now I expect, that this list of matches will be
retained until I'm through with completing of current word. Anything else is
very confusing.

Yes, I understand, that when completion inserts prefix, it considers the whole
story done. This was (and still is) true as long as we complete only prefix -
but it is wrong with general glob patterns.

So, I ask others - how often do you complete glob patterns in real life? I find
it often better when I know the real name but it won't be unique if I write only
prefixes. Using glob pattern(s) I can then specify the name unambiguously and
still save typing.

Is it possible to insert prefix but still do not exit the current completion
"session"? So, that the list that was generated first is used also for possible
menu completion? I tried _oldlist - but it does not seem to work (this is with
modified _match that always inserts prefix):

bor@itsrm2:/archive/pub/unix/zsh/patches/pws-24%> compconf
completer='_oldlist:_complete:_match'
bor@itsrm2:/archive/pub/unix/zsh/patches/pws-24%> l <6909-><TAB>
bor@itsrm2:/archive/pub/unix/zsh/patches/pws-24%> l 69<TAB>
6926   6933   6936   6937   6939   6941   6945   6946   6947   6955   6956
bor@itsrm2:/archive/pub/unix/zsh/patches/pws-24%> l 6901
6901   6903   6908   6933   6937   6941   6946   6955
6902   6904   6926   6936   6939   6945   6947   6956

/andrej



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