Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version:content-type;
        bh=rfLoVKa7SOzYr59x+nu1/O6/LCmZ2QzHVabRWRyF/wY=;
        b=WeOLjyqtXe5g2AebZBTUvMdLNYFYykhGGYtYrjeXaRs8BihvNnsi4+FEKqGjOu9eRx
         ClzzEx4UK34djcWzoc7NO4/8JO3XbmjGOXeyHWNkiSK6PjuQIpu64Hrd7B10JNAfUpLw
         aN0nZfKCJtOmgMNF3x4iGRc6mSUbMTuJYLlflKM2u7EserasYddb88PYnkTCH7ZUSwcE
         ThcLXOYWq30gEtwRdVV4h+qV4icYj2qo2uFvcFf2NwNowq6GWx+TTggwfyoeazu83Wqs
         O+beZVbG6RJt5u/+TTQHcp2cjwfiPzlyEPOyq+Jtecz7fnBlVj9dniL95YJv88v40CQm
         gl1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=rfLoVKa7SOzYr59x+nu1/O6/LCmZ2QzHVabRWRyF/wY=;
        b=VNfB0iO19UOImwc7BnsmJCPiLBlAsESom9cHjk1XuA1RuHK2LMul79HY3OjCyvn7FG
         YGkQkPy4U5d03ZVH4znbS/4gwjyf7hxp8/0P5lzPudiLgrtz6Rh0avCbB1bGZ7yCV5DK
         8xf//r0Rrts9w6Nk8q90H4xnh7vSYRJp7+Ilxk988jXlw/n3WE09BPQ0wfhM/+PzC55U
         yMzTMIGFihSVDaZ7iPda1baXpvSPOrRRNhhjuf+2C0UAGXreQNmtcfDTE5WA9X2GH6TX
         0df012GtnvybH8bpDvWrmT7909Cc7CXf6kiRUovlQe4PTqKJnI9Dw/KZQzWNahi5LP62
         F53g==
X-Gm-Message-State: AG10YOQ1sbSPWmVmXOKQxNCVs4M0FT6t2NsnEaPS2XCXiD240Z5BP2Xaf5gs8vTshThP1w==
X-Received: by 10.66.122.36 with SMTP id lp4mr15441052pab.31.1454089911801;
        Fri, 29 Jan 2016 09:51:51 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160129095239.ZM23860@torch.brasslantern.com>
Date: Fri, 29 Jan 2016 09:52:39 -0800
In-Reply-To: <CABq1aV__gsNumkqqdsnfH2sORfM9SuKo4wAgoE70i9SQ+Xu2pA@mail.gmail.com>
Comments: In reply to Silvio Ricardo Cordeiro <silvioricardoc@gmail.com>
        "Zstyle command completion does not work for some executables" (Jan 28, 12:52pm)
References: <CABq1aV__gsNumkqqdsnfH2sORfM9SuKo4wAgoE70i9SQ+Xu2pA@mail.gmail.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: Zstyle command completion does not work for some executables
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37840

[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.]

