summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Lee Marlow <lee.marlow@gmail.com>2008-08-04 23:50:33 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-08-05 21:21:19 -0700
commit5dad868b26919b03dd78fba182a152224a904d3a (patch)
treeb32417f6b8613a2abb2380824c02152ff6fa177c /contrib
parentbash completion: Add completion for 'git clean' (diff)
downloadtgif-5dad868b26919b03dd78fba182a152224a904d3a.tar.xz
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 97ece7d8e5..a6d8d0c03e 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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 ;;