aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Marlow <lee.marlow@gmail.com>2008-08-04 23:50:31 -0600
committerJunio C Hamano <gitster@pobox.com>2008-08-05 21:21:19 -0700
commit3eb11012078e9a2b9f444dbf1aae1f1cdd33fef1 (patch)
tree2d60251525e2ed6704cf01236eb478f59262f931
parent80828488cc5b1fd8395a27e272fa5f855c1ae472 (diff)
downloadgit-3eb11012078e9a2b9f444dbf1aae1f1cdd33fef1.tar.gz
git-3eb11012078e9a2b9f444dbf1aae1f1cdd33fef1.tar.xz
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>
-rwxr-xr-xcontrib/completion/git-completion.bash26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 253be56ae..147452528 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -667,6 +667,31 @@ _git_cherry_pick ()
esac
}
+_git_clone ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __gitcomp "
+ --local
+ --no-hardlinks
+ --shared
+ --reference
+ --quiet
+ --no-checkout
+ --bare
+ --mirror
+ --origin
+ --upload-pack
+ --template=
+ --depth
+ "
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_commit ()
{
__git_has_doubledash && return
@@ -1498,6 +1523,7 @@ _git ()
checkout) _git_checkout ;;
cherry) _git_cherry ;;
cherry-pick) _git_cherry_pick ;;
+ clone) _git_clone ;;
commit) _git_commit ;;
config) _git_config ;;
describe) _git_describe ;;