bash: Support completion on git-cherry.
I just realized I did not support ref name completion for git-cherry. This tool is just too useful to contributors who submit patches upstream by email; completion support for it is very handy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Feb 5, 2007 at 15:44 UTC
d8a9fea5ea44a4068cc95de9368798ae3cee74ee
1 file changed
+8
contrib/completion/git-completion.bash
+8
@@ -415,6 +415,11 @@ _git_checkout ()
415
__gitcomp "$(__git_refs)"
416
}
417
418
+_git_cherry ()
419
+{
420
+ __gitcomp "$(__git_refs)"
421
+}
422
+
423
_git_cherry_pick ()
424
{
425
local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -867,6 +872,7 @@ _git ()
872
apply) _git_apply ;;
873
branch) _git_branch ;;
874
checkout) _git_checkout ;;
875
+ cherry) _git_cherry ;;
876
cherry-pick) _git_cherry_pick ;;
877
commit) _git_commit ;;
878
config) _git_config ;;
@@ -909,6 +915,7 @@ complete -o default -o nospace -F _git_am git-am
915
complete -o default -o nospace -F _git_apply git-apply
916
complete -o default -o nospace -F _git_branch git-branch
917
complete -o default -o nospace -F _git_checkout git-checkout
918
+complete -o default -o nospace -F _git_cherry git-cherry
919
complete -o default -o nospace -F _git_cherry_pick git-cherry-pick
920
complete -o default -o nospace -F _git_commit git-commit
921
complete -o default -o nospace -F _git_diff git-diff
@@ -939,6 +946,7 @@ complete -o default -o nospace -F _git_add git-add.exe
946
complete -o default -o nospace -F _git_apply git-apply.exe
947
complete -o default -o nospace -F _git git.exe
948
complete -o default -o nospace -F _git_branch git-branch.exe
949
+complete -o default -o nospace -F _git_cherry git-cherry.exe
950
complete -o default -o nospace -F _git_diff git-diff.exe
951
complete -o default -o nospace -F _git_diff_tree git-diff-tree.exe
952
complete -o default -o nospace -F _git_format_patch git-format-patch.exe