@matheusbsbs / matheus-bagliano / commits / 374a58c9fb
Fork 0

git-completion.bash - add support for git-bundle

Signed-off-by: Mark Levedahl <mdl123@verizon.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Mark Levedahl committed Aug 12, 2007 at 14:46 UTC 374a58c9fbd4613800d01087c77373e561db90ae
1 file changed +32
contrib/completion/git-completion.bash
+32
@@ -459,6 +459,35 @@ _git_branch ()
459 __gitcomp "$(__git_refs)"
460 }
461
462 +_git_bundle ()
463 +{
464 + local mycword="$COMP_CWORD"
465 + case "${COMP_WORDS[0]}" in
466 + git)
467 + local cmd="${COMP_WORDS[2]}"
468 + mycword="$((mycword-1))"
469 + ;;
470 + git-bundle*)
471 + local cmd="${COMP_WORDS[1]}"
472 + ;;
473 + esac
474 + case "$mycword" in
475 + 1)
476 + __gitcomp "create list-heads verify unbundle"
477 + ;;
478 + 2)
479 + # looking for a file
480 + ;;
481 + *)
482 + case "$cmd" in
483 + create)
484 + __git_complete_revlist
485 + ;;
486 + esac
487 + ;;
488 + esac
489 +}
490 +
491 _git_checkout ()
492 {
493 __gitcomp "$(__git_refs)"
@@ -1009,6 +1038,7 @@ _git ()
1038 add) _git_add ;;
1039 apply) _git_apply ;;
1040 bisect) _git_bisect ;;
1041 + bundle) _git_bundle ;;
1042 branch) _git_branch ;;
1043 checkout) _git_checkout ;;
1044 cherry) _git_cherry ;;
@@ -1057,6 +1087,7 @@ complete -o default -o nospace -F _git_am git-am
1087 complete -o default -o nospace -F _git_apply git-apply
1088 complete -o default -o nospace -F _git_bisect git-bisect
1089 complete -o default -o nospace -F _git_branch git-branch
1090 +complete -o default -o nospace -F _git_bundle git-bundle
1091 complete -o default -o nospace -F _git_checkout git-checkout
1092 complete -o default -o nospace -F _git_cherry git-cherry
1093 complete -o default -o nospace -F _git_cherry_pick git-cherry-pick
@@ -1092,6 +1123,7 @@ complete -o default -o nospace -F _git_add git-add.exe
1123 complete -o default -o nospace -F _git_apply git-apply.exe
1124 complete -o default -o nospace -F _git git.exe
1125 complete -o default -o nospace -F _git_branch git-branch.exe
1126 +complete -o default -o nospace -F _git_bundle git-bundle.exe
1127 complete -o default -o nospace -F _git_cherry git-cherry.exe
1128 complete -o default -o nospace -F _git_diff git-diff.exe
1129 complete -o default -o nospace -F _git_format_patch git-format-patch.exe