Re: [PATCH 3/6] completion: add common options for blame

4 messages, 4 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/6] completion: add common options for blame

From: Thomas Rast <hidden>
Date: 2016-06-15 22:57:32

Ramkumar Ramachandra [off-list ref] writes:
Add support for completing 'git blame'.  List only the common short
options.
[...]
+_git_blame ()
+{
+	__git_has_doubledash && return
+
+	case "$cur" in
+	-*)
+		__gitcomp "-M -C -L -s -w"
+	esac
+	__git_complete_revlist_file
+}
Is this the first time we introduce completion (I guess you could call
it "help") for short options?  I only did a quick search for /-. -/ but
it certainly seems that way.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: [PATCH 3/6] completion: add common options for blame

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:32

Thomas Rast wrote:
Is this the first time we introduce completion (I guess you could call
it "help") for short options?  I only did a quick search for /-. -/ but
it certainly seems that way.
Yeah.  We generally prefer the long-form equivalents while doing
completions, but these blame options do not have equivalent
long-forms.

Re: [PATCH 3/6] completion: add common options for blame

From: SZEDER Gábor <hidden>
Date: 2016-06-15 22:57:32

On Mon, Jun 03, 2013 at 03:02:00PM +0530, Ramkumar Ramachandra wrote:
Thomas Rast wrote:
quoted
Is this the first time we introduce completion (I guess you could call
it "help") for short options?  I only did a quick search for /-. -/ but
it certainly seems that way.
Yeah.  We generally prefer the long-form equivalents while doing
completions, but these blame options do not have equivalent
long-forms.
But providing short options for completion is pointless.  Those who
know git blame's short options will just type them right away, because
it requires less key presses than using completion, and those who
don't know these options will only see -C, -M, etc. and won't have any
clues what it stands for.


Best,
Gábor

Re: [PATCH 3/6] completion: add common options for blame

From: Peter Krefting <hidden>
Date: 2016-06-15 22:57:34

Ramkumar Ramachandra:
Yeah.  We generally prefer the long-form equivalents while doing 
completions, but these blame options do not have equivalent 
long-forms.
Perhaps that is the real bug, then. -M and -C already have long names 
for diff (and its friends), perhaps blame should have the same long 
option names for them?

-- 
\\// Peter - http://www.softwolves.pp.se/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help