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

Re: Zstyle command completion does not work for some executables

OK, thank you for the pointers.


2016-01-29 11:01 GMT-02:00 Peter Stephenson <p.stephenson@xxxxxxxxxxx>:

> On Fri, 29 Jan 2016 10:35:43 -0200
> Silvio Ricardo Cordeiro <silvioricardoc@xxxxxxxxx> wrote:
> > For killall & rake, I get "testing" as a suggestion, as I expected.  For
> > the others, nothing happens (they continue trying to complete with
> > filenames, the default behavior).
> You're missing the point of the "command" style.  Read the docmentation
> in Standard Styles in zshcompsys in more detail.  As a summary:
> For some commands, as part of the way the completion system gathers
> information to complete, it needs to run the command named.  In the case
> of killall and rake, it does so to find out what processes killall knows
> about or what targets rake knows about.  So if you tell it to run a
> different command here it will do so.
> For the vast majority of completion contexts, it doesn't need to do
> this.  It makes up the completion based on what it's been told the
> context is.  It doesn't run an external command for this.
> I think what you're trying to do is add completion for a new context (a
> specific command) or modify an existing one.  The "command" style has
> got nothing at all to do with this.  Instead, you need to start much
> deeper in the documentation and learn about how to add new completions
> or modify exsting ones.
> Oliver's chapters in the book, www.bash2zsh.com, are a good starting
> point.
> Otherwise, have a glance through
> http://zsh.sourceforge.net/Guide/zshguide06.html#l144
> and in particular section 6.9.
> pws

Silvio Ricardo Cordeiro

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