From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1982 invoked by alias); 3 Aug 2011 15:30:01 -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: 29641 Received: (qmail 1308 invoked from network); 3 Aug 2011 15:29:49 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t8SayjRmkduQAbm3eu3XFYOmGybxTE9d6M6FqjGp9cg=; b=w/3g3jztOPwjAsTbL93SdbI+yDcG4nFcflp0boSAjOh9MrCgoikf8yJqmkadHVcRZp +Lwa6RicEzlkmt6eDVxXngk/COULMIRCAadFmav+lvyRTOWKg7aUGgyiTZgB0rrz+Hoe ++km5xfTbCcUKpqkBLb2F59ptJ+IzvfNPvHxg= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com In-Reply-To: References: <871v22krki.fsf@ft.bewatermyfriend.org> Date: Wed, 3 Aug 2011 17:21:24 +0200 X-Google-Sender-Auth: uM5PpCRk6fXcysERCV0VKpcU2VI Message-ID: Subject: Re: PATCH: git --pretty completion, and (new) completion for npm From: Nikolai Weibull To: Mikael Magnusson Cc: =?UTF-8?Q?Johan_Sundstr=C3=B6m?= , zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 3, 2011 at 17:05, Mikael Magnusson wrote: > 2011/8/3 Nikolai Weibull : >> 2011/3/20 Johan Sundstr=C3=B6m : >>> On Sun, Mar 20, 2011 at 03:35, Frank Terbeck w= rote: >>>> Johan Sundstr=C3=B6m wrote: >>>> > I took to adding documented completion for to the git completer for >>>> syntax that >>>> > is impossible to remember and hard to find in the man page; git log >>>> --pretty >>>> > (and whichever other commands support --pretty / --format) now cover= s the >>>> whole >>>> > lot except %w, which seemed like it would need a whole little state >>>> machine in >>>> > itself. >> >>>> Hm. This only works for stuff directly after the `=3D', doesn't it? As= in: >>>> >>>> % git log -1 --pretty=3D% >> >>> Correct; enough to document what the properties are when there's just t= he >>> one you're interested in (for me it's usually %H for the commit hash), = but >>> sub-ideal for longer formats. >>> >>> But not in: >>>> >>>> % git log -1 --pretty=3D"%H % >>>> >>>> That would be pretty useful, don't you think? >> >>> It certainly would, but I fear my completion beard is not quite long en= ough >>> yet for me to pull off that state machine, myself. :-) >> >> This was never applied. =C2=A0Is anyone interested in having this added? >> If so, it should be cleaned up and should probably add proper %w >> handling and multiple-item handling. > Not sure if this helps you, > http://www.zsh.org/mla/workers/2011/msg00861.html but it also > completes a bunch of %stuff after an assignment, so it seems similar. Thanks, though I think I have a grip on how it should be done (I do something similar already in parts of the git-config completion, I believe). I was, however, hoping that someone else would take a look and do it :-).