Re: Custom git completion
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 29, 2010, 18:02 UTC
- Message-ID
- <7vockciyb8.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100129175950.GE21821@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 9 quoted lines
>> An alias that uses another git subcommand (i.e. the ones that do not start >> with a bang "!") seems to be handled correctly, but one of my aliases is >> this: >> >> [alias] >> lgm = "!sh -c 'GIT_NOTES_REF=refs/notes/amlog git log \"$@\" || :' -" > > Doing this is difficult, because its hard to parse that string and > do completion on it.
That is why I said it is unfair to expect completion code to do that.
> [completion] > lgm = log > > and have `git lgm` complete using the same rules as `git log`.
I actually like that. It matches _my_ expectation as a user to be able to say "this subcommand has args that look like those given to 'log'".