zsh-workers
 help / color / mirror / code / Atom feed
From: Nikolai Weibull <now@bitwi.se>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: "Johan Sundström" <oyasumi@gmail.com>, zsh-workers@zsh.org
Subject: Re: PATCH: git --pretty completion, and (new) completion for npm
Date: Wed, 3 Aug 2011 17:21:24 +0200	[thread overview]
Message-ID: <CADdV=MuA5DZ_9ibFYMm0v6tio7DT=1TJ87_cB0YaqffK-9Djog@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3R7VM=oxOTF6c5BSrXO-TF65cKoWv6Sm+1XakWiVhLr_A@mail.gmail.com>

On Wed, Aug 3, 2011 at 17:05, Mikael Magnusson <mikachu@gmail.com> wrote:
> 2011/8/3 Nikolai Weibull <now@bitwi.se>:
>> 2011/3/20 Johan Sundström <oyasumi@gmail.com>:
>>> On Sun, Mar 20, 2011 at 03:35, Frank Terbeck <ft@bewatermyfriend.org> wrote:
>>>> Johan Sundström 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 covers 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 `=', doesn't it? As in:
>>>>
>>>> % git log -1 --pretty=%<tab>
>>
>>> Correct; enough to document what the properties are when there's just the
>>> 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="%H %<tab>
>>>>
>>>> That would be pretty useful, don't you think?
>>
>>> It certainly would, but I fear my completion beard is not quite long enough
>>> yet for me to pull off that state machine, myself. :-)
>>
>> This was never applied.  Is 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 :-).


      reply	other threads:[~2011-08-03 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14  6:38 Johan Sundström
2011-03-20 10:35 ` Frank Terbeck
2011-03-20 11:52   ` Johan Sundström
2011-08-03 14:46     ` Nikolai Weibull
2011-08-03 15:05       ` Mikael Magnusson
2011-08-03 15:21         ` Nikolai Weibull [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADdV=MuA5DZ_9ibFYMm0v6tio7DT=1TJ87_cB0YaqffK-9Djog@mail.gmail.com' \
    --to=now@bitwi.se \
    --cc=mikachu@gmail.com \
    --cc=oyasumi@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).