git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH] bash completion: add basic support for git-reflog
Date: Mon, 22 Nov 2010 23:50:44 +0800	[thread overview]
Message-ID: <AANLkTinJPQF-khzViED+ROyojEr9nHrcgwKQWsDugD7Y@mail.gmail.com> (raw)
In-Reply-To: <20101122152409.GA7010@neumann>

Hi,

2010/11/22 SZEDER Gábor <szeder@ira.uka.de>:
> On Sun, Nov 21, 2010 at 01:32:48AM +0800, Tay Ray Chuan wrote:
>> Add basic completion for the three subcommands - show, expire, delete.
>> Try completing refs for these too.
>
> Heh, I've always thought reflog is plumbing, and that's why the
> completion script doesn't support it.

That didn't really cross my mind, I just did this out of my irritation
with its absence.

(After some checking, it's actually part of git-log, so I don't think
it counts as plumbing.)

> This only looks at the previous word on the command line, and leads to
> wrong behavior when an option is used:
>
>  $ git reflog expire --verbose <TAB><TAB>
>  delete   expire   show
>
> To prevent this you could use the __git_find_on_cmdline() helper
> function and follow how other completion functions use it.

Yep I'll look into it.

-- 
Cheers,
Ray Chuan

  reply	other threads:[~2010-11-22 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20 17:32 [PATCH] bash completion: add basic support for git-reflog Tay Ray Chuan
2010-11-22 15:24 ` SZEDER Gábor
2010-11-22 15:50   ` Tay Ray Chuan [this message]
2010-11-22 17:09     ` Tay Ray Chuan
2010-11-22 17:20       ` Jonathan Nieder

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=AANLkTinJPQF-khzViED+ROyojEr9nHrcgwKQWsDugD7Y@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    --cc=szeder@ira.uka.de \
    /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.
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).