Re: [PATCH 3/6] completion: add common options for blame
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/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] completion: add common options for blame
Ramkumar Ramachandra artag...@gmail.com 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 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] completion: add common options for blame
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. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] completion: add common options for blame
Thomas Rast tr...@inf.ethz.ch writes: Ramkumar Ramachandra artag...@gmail.com 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. Yeah, I do not think this is a good idea. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] completion: add common options for blame
On Mon, Jun 03, 2013 at 03:02:00PM +0530, Ramkumar Ramachandra wrote: 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. 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 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] completion: add common options for blame
SZEDER Gábor sze...@ira.uka.de writes: 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. It is not necessarily true that they won't have any clue; one could argue that -C -M etc can serve as reminder to people who once learned but forgot momentarily. My conclusion is the same, though; git blame -h is for those people. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] completion: add common options for blame
Add support for completing 'git blame'. List only the common short options. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- contrib/completion/git-completion.bash | 11 +++ 1 file changed, 11 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 139f48e..a003b81 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1034,6 +1034,17 @@ _git_bisect () esac } +_git_blame () +{ + __git_has_doubledash return + + case $cur in + -*) + __gitcomp -M -C -L -s -w + esac + __git_complete_revlist_file +} + _git_branch () { local i c=1 only_local_ref=n has_r=n -- 1.8.3.457.g2410d5e -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html