zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Zstyle command completion does not work for some executables
Date: Fri, 29 Jan 2016 09:52:39 -0800	[thread overview]
Message-ID: <160129095239.ZM23860@torch.brasslantern.com> (raw)
In-Reply-To: <CABq1aV__gsNumkqqdsnfH2sORfM9SuKo4wAgoE70i9SQ+Xu2pA@mail.gmail.com>

[I wrote all this and then it never went out.  Sending it anyway because
it adds a little bit to PWS's response.]

On Jan 28, 12:52pm, Silvio Ricardo Cordeiro wrote:
} Subject: Zstyle command completion does not work for some executables

The "command" style is implemented by the _call_program helper function.
Consequently it only works for completions that use _call_program.

Doc says:

     In many places, completion functions need to call external
     commands to generate the list of completions.  This style can be
     used to override the command that is called in some such cases.

In your examples e.g.

} > zstyle ':completion:*:*bash*:*' command 'echo testing'

The writer of the _sh completion did not feel any external command
was needed in order to generate the list of completions, so no use
of _call_program was made and the command style does not apply.  For
an arbitrary command in your path, there probably isn't a specific
completion function at all, so there can't be a _call_program.

[Rest trimmed as it duplicated what PWS already said.]


      parent reply	other threads:[~2016-01-29 17:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 14:52 Silvio Ricardo Cordeiro
2016-01-28 14:54 ` Silvio Ricardo Cordeiro
2016-01-29  9:19 ` Daniel Shahaf
2016-01-29 12:35   ` Silvio Ricardo Cordeiro
2016-01-29 13:01     ` Peter Stephenson
2016-01-29 13:19       ` Silvio Ricardo Cordeiro
2016-01-29 17:52 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160129095239.ZM23860@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).