Thread (12 messages) flat view 12 messages, 4 authors, 2016-06-15

Re: Custom git completion

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:07

Possibly related (same subject, not in this thread)

"Shawn O. Pearce" [off-list ref] writes:
quoted
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'".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help