summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-12-16 14:56:08 +0800
committerJunio C Hamano <gitster@pobox.com>2010-12-17 11:55:19 -0800
commit057f327972e7016703317e65e7af144a8e244d0a (patch)
tree52ac4708cf95dde8e0ee1a92d35a9c3f36f9f2f6 /contrib
parent1b9743462d9ef3c0e73a3c439de45c0c16b6c938 (diff)
downloadgit-057f327972e7016703317e65e7af144a8e244d0a.tar.gz
bash completion: add basic support for git-reflog
"Promote" the reflog command out of plumbing, so that we now run completion for it. After all, it's listed under porcelain (ancillary), and we do run completion for those commands. Add basic completion for the three subcommands - show, expire, delete. Try completing refs for these too. Helped-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 604fa794cc..9d6c880e18 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -735,7 +735,6 @@ __git_list_porcelain_commands ()
quiltimport) : import;;
read-tree) : plumbing;;
receive-pack) : plumbing;;
- reflog) : plumbing;;
remote-*) : transport;;
repo-config) : deprecated;;
rerere) : plumbing;;
@@ -1632,6 +1631,18 @@ _git_rebase ()
__gitcomp "$(__git_refs)"
}
+_git_reflog ()
+{
+ local subcommands="show delete expire"
+ local subcommand="$(__git_find_on_cmdline "$subcommands")"
+
+ if [ -z "$subcommand" ]; then
+ __gitcomp "$subcommands"
+ else
+ __gitcomp "$(__git_refs)"
+ fi
+}
+
__git_send_email_confirm_options="always never auto cc compose"
__git_send_email_suppresscc_options="author self cc bodycc sob cccmd body all"