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

Re[2]: how to customize _all_matches use?

On Sat, 16 Jun 2007 18:25:58 +0100 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:

PS> The following should fix it:
PS> zstyle ':completion:all-matches:*' insert true

 Thanks a lot Peter! With your hint it does indeed work as [I] expected.

PS> This is mentioned in the manual under the style "insert", but you have
PS> to go hunting and have some idea of what you're looking for (I actually
PS> found it by looking at the completer itself.)  The business about the
PS> completer doesn't seemed to be mentioned at all, but I have the same
PS> experience as you.  It looks like the manual needs to be updated.

 Your patch in the other message indeed makes it much more clear, thanks.

PS> >  And, of course, I don't really want to have this behaviour so much for ls
PS> > as for other commands where the completion can't be replaced with just '*'.
PS> > For example, it would be very useful to have for "cvs diff" for which I use
PS> > 
PS> > 	zstyle ':completion::complete:cvs-diff:argument-rest:' \
PS> > 		tag-order existing-files removed-files directories
PS> > 
PS> > so that pressing TAB after "cvs di" normally completes only the modified
PS> > files. But pressing ^Xa also completes the sub-directories -- is there any
PS> > way I could avoid this?
PS> I haven't tried this, but you should still be able to use the
PS> tag-order style with all-matches.  The context will be different,
PS> though; as in the styles you quoted it should start
PS> ':completion:all-matches:'.  If it's not that obvious or nothing works,
PS> let us know.

 It does work if I do

	zstyle ':completion:all-matches:*' tag-order ...

but I still don't know how to limit this for cvs completion only as using
the context of ':completion:all-matches:cvs-commit:*' doesn't work. I
wonder if _complete_help can somehow be used to show the context for
another completer?

 Anyhow, for now I'm quite happy with setting the tag-order globally and
it's very nice to have this available. Thanks once again for your help and
the manual update (and thanks to Bart for explaining why was I getting 2
completion prompts, this was quite mysterious to me so I'm glad to know the
reason now)!

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