@matheusbsbs / matheus-bagliano / commits / 3eb1101207
Fork 0

bash completion: Add completion for 'git clone'

Add completions for all long options specified in the docs --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lee Marlow committed Aug 4, 2008 at 23:50 UTC 3eb11012078e9a2b9f444dbf1aae1f1cdd33fef1
1 file changed +26
contrib/completion/git-completion.bash
+26
@@ -667,6 +667,31 @@ _git_cherry_pick ()
667 esac
668 }
669
670 +_git_clone ()
671 +{
672 + local cur="${COMP_WORDS[COMP_CWORD]}"
673 + case "$cur" in
674 + --*)
675 + __gitcomp "
676 + --local
677 + --no-hardlinks
678 + --shared
679 + --reference
680 + --quiet
681 + --no-checkout
682 + --bare
683 + --mirror
684 + --origin
685 + --upload-pack
686 + --template=
687 + --depth
688 + "
689 + return
690 + ;;
691 + esac
692 + COMPREPLY=()
693 +}
694 +
695 _git_commit ()
696 {
697 __git_has_doubledash && return
@@ -1498,6 +1523,7 @@ _git ()
1523 checkout) _git_checkout ;;
1524 cherry) _git_cherry ;;
1525 cherry-pick) _git_cherry_pick ;;
1526 + clone) _git_clone ;;
1527 commit) _git_commit ;;
1528 config) _git_config ;;
1529 describe) _git_describe ;;