From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27896 invoked by alias); 30 Aug 2010 16:44:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28215 Received: (qmail 17740 invoked from network); 30 Aug 2010 16:44:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100830094359.ZM7722@torch.brasslantern.com> Date: Mon, 30 Aug 2010 09:43:59 -0700 In-reply-to: Comments: In reply to Nikolai Weibull "Re: [PATCH] _git: Add completion for help subcommand" (Aug 26, 9:55am) References: <1282393263-16767-1-git-send-email-aaron@schrab.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] _git: Add completion for help subcommand MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Aug 26, 9:55am, Nikolai Weibull wrote: } Subject: Re: [PATCH] _git: Add completion for help subcommand } } On Thu, Aug 26, 2010 at 05:29, Benjamin R. Haskell wrote: } > On Thu, 26 Aug 2010, Nikolai Weibull wrote: } > } >> On Sat, Aug 21, 2010 at 14:21, Aaron Schrab wrote: } >> } >> Seems fine except for this: } >> } >> > + local formats='(--info -i --man -m --web -w)' } >> } >> Although this is sort of nice it doesn't follow the style of this or } >> other completion files, so please write out the whole list in each } >> line. } } > It's just visual clutter. Is there a particular reason not to use a } > variable? } } Perhaps. The common pattern I saw when I began writing completion } functions was } } ( --b --c)--a } (--a --c)--b } (--a --b )--c } } I'd really appreciate some kind of vote or input on this. If we } decide on using variables they should be used throughout. }-- End of excerpt from Nikolai Weibull Nikolai, I think you're missing the point of the abc example you quoted. In that example, every set inside the parens is different, and the writer of the function chose to lay them out so that it was obvious where the differences were. In the cases that use variables, the subset represented by the variable is identical in every instance, so it makes sense to write out that subset only once in the variable assignment. E.g., both styles are consistent and they could even be mixed: def=(--d --e --f) ( --b --c $def --g)--a (--a --c $def --g)--b (--a --b $def --g)--c (--a --b --c $def )--g There's no reason to pick one or the other and require it everywhere.