Skip to content

Commit 7190a67

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba931ed commit 7190a67

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,20 @@ _git_push ()
19761976
__git_complete_remote_or_refspec
19771977
}
19781978

1979+
_git_range_diff ()
1980+
{
1981+
case "$cur" in
1982+
--*)
1983+
__gitcomp "
1984+
--creation-factor= --dual-color
1985+
$__git_diff_common_options
1986+
"
1987+
return
1988+
;;
1989+
esac
1990+
__git_complete_revlist
1991+
}
1992+
19791993
_git_rebase ()
19801994
{
19811995
__git_find_repo_path

0 commit comments

Comments
 (0)