aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Marlow <lee.marlow@gmail.com>2008-08-04 23:50:34 -0600
committerJunio C Hamano <gitster@pobox.com>2008-08-05 21:21:19 -0700
commita6c2be244f45432617944e684156556482fb11b6 (patch)
treec77115691ec77b5ea678e1277342fa6313a006d8
parent5dad868b26919b03dd78fba182a152224a904d3a (diff)
downloadgit-a6c2be244f45432617944e684156556482fb11b6.tar.gz
git-a6c2be244f45432617944e684156556482fb11b6.tar.xz
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>
-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 a6d8d0c03..265842712 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1287,6 +1287,18 @@ _git_reset ()
__gitcomp "$(__git_refs)"
}
+_git_revert ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __gitcomp "--edit --mainline --no-edit --no-commit --signoff"
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_rm ()
{
__git_has_doubledash && return
@@ -1578,6 +1590,7 @@ _git ()
rebase) _git_rebase ;;
remote) _git_remote ;;
reset) _git_reset ;;
+ revert) _git_revert ;;
rm) _git_rm ;;
send-email) _git_send_email ;;
shortlog) _git_shortlog ;;