@matheusbsbs / matheus-bagliano / commits / 1127c51cfe
Fork 0

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>

Lee Marlow committed Aug 4, 2008 at 23:50 UTC 1127c51cfe09f0d7d26869e7a895190214ce049a
1 file changed +13
contrib/completion/git-completion.bash
+13
@@ -1006,6 +1006,18 @@ _git_merge_base ()
1006 __gitcomp "$(__git_refs)"
1007 }
1008
1009 +_git_mv ()
1010 +{
1011 + local cur="${COMP_WORDS[COMP_CWORD]}"
1012 + case "$cur" in
1013 + --*)
1014 + __gitcomp "--dry-run"
1015 + return
1016 + ;;
1017 + esac
1018 + COMPREPLY=()
1019 +}
1020 +
1021 _git_name_rev ()
1022 {
1023 __gitcomp "--tags --all --stdin"
@@ -1639,6 +1651,7 @@ _git ()
1651 ls-tree) _git_ls_tree ;;
1652 merge) _git_merge;;
1653 merge-base) _git_merge_base ;;
1654 + mv) _git_mv ;;
1655 name-rev) _git_name_rev ;;
1656 pull) _git_pull ;;
1657 push) _git_push ;;