Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zstyle command completion does not work for some executables
- X-seq: zsh-workers 37836
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Silvio Ricardo Cordeiro <silvioricardoc@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: Zstyle command completion does not work for some executables
- Date: Fri, 29 Jan 2016 13:01:20 +0000
- In-reply-to: <CABq1aV8Wv6bMGoodGCOX=wGmhd6zzJxJR=AZc4eA1JYRr+x4MQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CABq1aV__gsNumkqqdsnfH2sORfM9SuKo4wAgoE70i9SQ+Xu2pA@mail.gmail.com> <20160129091907.GC28305@tarsus.local2> <CABq1aV8Wv6bMGoodGCOX=wGmhd6zzJxJR=AZc4eA1JYRr+x4MQ@mail.gmail.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author