From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14956 invoked by alias); 12 Jan 2015 09:09:19 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19732 Received: (qmail 13643 invoked from network); 12 Jan 2015 09:09:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Mon, 12 Jan 2015 10:09:03 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: completion Message-ID: <20150112090903.GA27773@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <141210214454.ZM12261@torch.brasslantern.com> <5489C8F4.8030703@eastlink.ca> <141211092824.ZM13349@torch.brasslantern.com> <5489F1BC.5000900@eastlink.ca> <20150107150109.GA14088@ypig.lip.ens-lyon.fr> <20150108004323.GA7954@xvii.vinc17.org> <20150108123606.GA9609@ypig.lip.ens-lyon.fr> <150109181241.ZM21734@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <150109181241.ZM21734@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6391-vl-r75100 (2015-01-06) On 2015-01-09 18:12:41 -0800, Bart Schaefer wrote: > On Jan 8, 1:36pm, Vincent Lefevre wrote: > } > } I don't understand. I suppose that the real intent of > } > } zstyle ':completion:*:complete:*' matcher-list [...] > } > } was to match the completer "complete", i.e. like > } > } zstyle ':completion:*:complete:*:*:*' matcher-list [...] > } > } But what if the context is ":completion::foo:complete::" in some > } completion, i.e. with the completer "foo" and the command "complete"? > > First of all, the completer "_foo" would have had to have been added > to the "completer" style (the default value of this style is _complete > and _ignored), and second, the _foo function would have to contain a > zstyle command that looks up the value of the matcher-list style. If > either of those conditions does not hold, the context will never be > ":completion::foo:complete::" and the question is not relevant. There is something similar in the zshcompsys(1) man page: zstyle ':completion:*' completer _complete _correct _complete:foo zstyle ':completion:*:complete:*' matcher-list \ '' 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*:foo:*' matcher-list \ 'm:{a-zA-Z}={A-Za-z} r:|[-_./]=* r:|=*' > The assumption, therefore, is that if the user has deliberately added > _foo to the completer style, then he is also aware that _foo may want > to look up match-list, and therefore he will have used the form with > more colons and/or fewer asterisks when defining the matcher-list for > each of the two completers that want a matcher-list. Why hasn't this been done for the man page? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)