Skip to content

Commit 876e78f

Browse files
committed
Merge branch 'tc/completion-reflog'
* tc/completion-reflog: bash completion: add basic support for git-reflog
2 parents 41cd797 + 057f327 commit 876e78f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ __git_list_porcelain_commands ()
735735
quiltimport) : import;;
736736
read-tree) : plumbing;;
737737
receive-pack) : plumbing;;
738-
reflog) : plumbing;;
739738
remote-*) : transport;;
740739
repo-config) : deprecated;;
741740
rerere) : plumbing;;
@@ -1632,6 +1631,18 @@ _git_rebase ()
16321631
__gitcomp "$(__git_refs)"
16331632
}
16341633

1634+
_git_reflog ()
1635+
{
1636+
local subcommands="show delete expire"
1637+
local subcommand="$(__git_find_on_cmdline "$subcommands")"
1638+
1639+
if [ -z "$subcommand" ]; then
1640+
__gitcomp "$subcommands"
1641+
else
1642+
__gitcomp "$(__git_refs)"
1643+
fi
1644+
}
1645+
16351646
__git_send_email_confirm_options="always never auto cc compose"
16361647
__git_send_email_suppresscc_options="author self cc bodycc sob cccmd body all"
16371648

0 commit comments

Comments
 (0)