From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9486 invoked by alias); 11 Dec 2014 17:28:34 -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: 19524 Received: (qmail 16133 invoked from network); 11 Dec 2014 17:28:33 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=b6gFOWC0 c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=cLddeLN3TMRuXPs1liAA:9 a=pzUSqAHrGFLw53nZ:21 a=o_tKaV-JPt5_xV2f:21 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141211092824.ZM13349@torch.brasslantern.com> Date: Thu, 11 Dec 2014 09:28:24 -0800 In-reply-to: <5489C8F4.8030703@eastlink.ca> Comments: In reply to Ray Andrews "Re: completion" (Dec 11, 8:40am) References: <5488D414.6010300@eastlink.ca> <30453.1418258082@thecus.kiddle.eu> <5488F0AC.2040901@eastlink.ca> <141210214454.ZM12261@torch.brasslantern.com> <5489C8F4.8030703@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 11, 8:40am, Ray Andrews wrote: } Subject: Re: completion } } > } On 12/10/2014 04:34 PM, Oliver Kiddle wrote: } > } > The five colons are included because they prevent the completer style } > } If there's an explanation of the five colons I've missed it. Section 20.3.1 Completion System Configuration - Overview Third paragraph: The context string always consists of a fixed set of fields, separated by colons and with a leading colon before the first, in the form :completion:FUNCTION:COMPLETER:COMMAND:ARGUMENT:tag. ___________1________2_________3_______4________5 A bit later: The context is gradually put together as the functions are executed, starting with the main entry point, which adds :completion: and the FUNCTION element if necessary. The completer then adds the COMPLETER element. The contextual completion adds the COMMAND and ARGUMENT options. Finally, the TAG is added when the types of completion are known. } And I'm not being theatrical. If five colons has meaning, then one might } expect some other number of colons to have meaning as well. I tried to } understand that as empty fields as well, but the number of colons in } various examples changes so it can't be a dumb array kind of thing. They are in fact empty fields, but (again quoting section 20.3.1): When looking up styles the completion system uses full context names, including the tag. Looking up the value of a style therefore consists of two things: the context, which may be matched as a pattern, and the name of the style itself, which must be given exactly. Styles are a little inside-out in that the setting contains the pattern and the later lookup contains the fixed string to match. -- Barton E. Schaefer