summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Marlow <lee.marlow@gmail.com>2008-08-05 05:50:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-06 04:21:20 (GMT)
commit1127c51cfe09f0d7d26869e7a895190214ce049a (patch)
tree5b05a55c2998180cc9859503a2c00282b4a91479
parentb1bc1494edb1775e94a159dea67908b27c29017f (diff)
downloadgit-1127c51cfe09f0d7d26869e7a895190214ce049a.zip
git-1127c51cfe09f0d7d26869e7a895190214ce049a.tar.gz
git-1127c51cfe09f0d7d26869e7a895190214ce049a.tar.bz2
bash completion: Add completion for 'git mv'
Add completions for all long options specified in the docs --dry-run 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.bash13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7a7bc99..3396e35 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1006,6 +1006,18 @@ _git_merge_base ()
__gitcomp "$(__git_refs)"
}
+_git_mv ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __gitcomp "--dry-run"
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_name_rev ()
{
__gitcomp "--tags --all --stdin"
@@ -1639,6 +1651,7 @@ _git ()
ls-tree) _git_ls_tree ;;
merge) _git_merge;;
merge-base) _git_merge_base ;;
+ mv) _git_mv ;;
name-rev) _git_name_rev ;;
pull) _git_pull ;;
push) _git_push ;;