From a36f55180000b85735bbca58edb815cbbb1d8d96 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 25 Apr 2011 12:21:32 -0400 Subject: [PATCH] Added gitk and tig to Git completion. --- plugins/git/_git | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/git/_git b/plugins/git/_git index 37ea3383..4664cfa6 100644 --- a/plugins/git/_git +++ b/plugins/git/_git @@ -1,4 +1,4 @@ -#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell +#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell gitk tig # Some parts of this completion's behaviour are configurable: # @@ -4466,8 +4466,7 @@ _git_commands () { stash:'stash away changes to dirty working directory' status:'show working-tree status' submodule:'initialize, update, or inspect submodules' - tag:'create, list, delete or verify tag object signed with GPG' - gitk:'brows the repository interactively') + tag:'create, list, delete or verify tag object signed with GPG') local -a ancillary_manipulator_commands ancillary_manipulator_commands=( @@ -5962,6 +5961,16 @@ __git_color_attributes () { _describe -t attributes attribute attributes $* } +(( $+functions[_gitk] )) || +_gitk () { + _git-log +} + +(( $+functions[_tig] )) || +_tig () { + _git-log +} + # Now, for the main driver… _git() { if (( CURRENT > 2 )); then