@matheusbsbs / matheus-bagliano / commits / a6c2be244f
Fork 0

bash completion: Add completion for 'git revert'

Add completions for all long options specified in the docs --edit --mainline --no-edit --no-commit --signoff 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 a6c2be244f45432617944e684156556482fb11b6
1 file changed +13
contrib/completion/git-completion.bash
+13
@@ -1287,6 +1287,18 @@ _git_reset ()
1287 __gitcomp "$(__git_refs)"
1288 }
1289
1290 +_git_revert ()
1291 +{
1292 + local cur="${COMP_WORDS[COMP_CWORD]}"
1293 + case "$cur" in
1294 + --*)
1295 + __gitcomp "--edit --mainline --no-edit --no-commit --signoff"
1296 + return
1297 + ;;
1298 + esac
1299 + COMPREPLY=()
1300 +}
1301 +
1302 _git_rm ()
1303 {
1304 __git_has_doubledash && return
@@ -1578,6 +1590,7 @@ _git ()
1590 rebase) _git_rebase ;;
1591 remote) _git_remote ;;
1592 reset) _git_reset ;;
1593 + revert) _git_revert ;;
1594 rm) _git_rm ;;
1595 send-email) _git_send_email ;;
1596 shortlog) _git_shortlog ;;