@matheusbsbs / matheus-bagliano / commits / 5dad868b26
Fork 0

bash completion: Add completion for 'git init'

Add completions for all long options specified in the docs --quiet --bare --template= --shared --shared={false|true|umask|group|all|world|everybody} 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 5dad868b26919b03dd78fba182a152224a904d3a
1 file changed +19
contrib/completion/git-completion.bash
+19
@@ -865,6 +865,24 @@ _git_help ()
865 __gitcomp "$(__git_all_commands)"
866 }
867
868 +_git_init ()
869 +{
870 + local cur="${COMP_WORDS[COMP_CWORD]}"
871 + case "$cur" in
872 + --shared=*)
873 + __gitcomp "
874 + false true umask group all world everybody
875 + " "" "${cur##--shared=}"
876 + return
877 + ;;
878 + --*)
879 + __gitcomp "--quiet --bare --template= --shared --shared="
880 + return
881 + ;;
882 + esac
883 + COMPREPLY=()
884 +}
885 +
886 _git_ls_remote ()
887 {
888 __gitcomp "$(__git_remotes)"
@@ -1548,6 +1566,7 @@ _git ()
1566 gc) _git_gc ;;
1567 grep) _git_grep ;;
1568 help) _git_help ;;
1569 + init) _git_init ;;
1570 log) _git_log ;;
1571 ls-remote) _git_ls_remote ;;
1572 ls-tree) _git_ls_tree ;;