aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-08-13 04:33:27 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-13 10:44:51 -0700
commit7190a67eab181ebfbf61f4c8afaa3a149f685853 (patch)
treeccd41a3e7eb74bdc19939c7ebc05dd32564db65d /contrib/completion/git-completion.bash
parentba931edd284f705d0c4b9af1f50f74a784fc6e34 (diff)
downloadgit-7190a67eab181ebfbf61f4c8afaa3a149f685853.tar.gz
completion: support `git range-diff`
Tab completion of `git range-diff` is very convenient, especially given that the revision arguments to specify the commit ranges to compare are typically more complex than, say, what is normally passed to `git log`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 94c95516eb..3d4ec34323 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1976,6 +1976,20 @@ _git_push ()
__git_complete_remote_or_refspec
}
+_git_range_diff ()
+{
+ case "$cur" in
+ --*)
+ __gitcomp "
+ --creation-factor= --dual-color
+ $__git_diff_common_options
+ "
+ return
+ ;;
+ esac
+ __git_complete_revlist
+}
+
_git_rebase ()
{
__git_find_repo_path