1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
# (C) 2011-2016 magicant
# Completion script for the "git-revert" command.
# Supports Git 2.9.3.
function completion/git-revert {
WORDS=(git revert "${WORDS[2,-1]}")
command -f completion//reexecute
}
function completion/git::revert:arg {
OPTIONS=( #>#
"--abort; end suspended revert and restore the original state"
"--continue; resume suspended revert"
"e --edit; (re)edit the message"
"m: --mainline:; specify the mainline parent by number"
"n --no-commit; don't commit the reversion result automatically"
"--no-edit; don't reedit the message"
"--quit; end suspended quit and keep the current state"
"S:: --gpg-sign::; sign commits with GPG"
"s --signoff; add a \"signed-off-by\" line to the message"
"--strategy:; specify the merge strategy"
"X: --strategy-option:; specify a strategy-specific option"
) #<#
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
('')
command -f completion/git::completeref range=true
;;
(*)
if command -vf completion/git::merge:compopt >/dev/null 2>&1 ||
. -AL completion/git-merge; then
command -f completion/git::merge:compopt
fi
;;
esac
}
# vim: set ft=sh ts=8 sts=8 sw=8 noet:
|