提交 5dad868b 编写于 作者: L Lee Marlow 提交者: Junio C Hamano

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: NLee Marlow <lee.marlow@gmail.com>
Acked-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 4181c7e8
......@@ -865,6 +865,24 @@ _git_help ()
__gitcomp "$(__git_all_commands)"
}
_git_init ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--shared=*)
__gitcomp "
false true umask group all world everybody
" "" "${cur##--shared=}"
return
;;
--*)
__gitcomp "--quiet --bare --template= --shared --shared="
return
;;
esac
COMPREPLY=()
}
_git_ls_remote ()
{
__gitcomp "$(__git_remotes)"
......@@ -1548,6 +1566,7 @@ _git ()
gc) _git_gc ;;
grep) _git_grep ;;
help) _git_help ;;
init) _git_init ;;
log) _git_log ;;
ls-remote) _git_ls_remote ;;
ls-tree) _git_ls_tree ;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册