diff options
author | Thomas Rast <trast@student.ethz.ch> | 2008-07-23 23:36:15 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-23 17:06:36 -0700 |
commit | 2ca880fe54660869bc93a2302efced9ab64511d9 (patch) | |
tree | 3f005db5360d69b59442fa7cc4d4ae48a896a27a /contrib | |
parent | bash completion: Add long options for 'git rm' (diff) | |
download | tgif-2ca880fe54660869bc93a2302efced9ab64511d9.tar.xz |
git-completion.bash: provide completion for 'show-branch'
It previously used the same as 'log', but the options are quite
different and the arguments must be single refs (or globs).
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/completion/git-completion.bash | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e20d57a1ba..3b049348c3 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1224,6 +1224,22 @@ _git_show () __git_complete_file } +_git_show_branch () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp " + --all --remotes --topo-order --current --more= + --list --independent --merge-base --no-name + --sha1-name --topics --reflog + " + return + ;; + esac + __git_complete_revlist +} + _git_stash () { local subcommands='save list show apply clear drop pop create' @@ -1443,7 +1459,7 @@ _git () send-email) _git_send_email ;; shortlog) _git_shortlog ;; show) _git_show ;; - show-branch) _git_log ;; + show-branch) _git_show_branch ;; stash) _git_stash ;; submodule) _git_submodule ;; svn) _git_svn ;; |