completion: add format-patch options to send-email
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
42e55a5f57
commit
2f65494d84
@ -1116,6 +1116,14 @@ _git_fetch ()
|
|||||||
__git_complete_remote_or_refspec
|
__git_complete_remote_or_refspec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__git_format_patch_options="
|
||||||
|
--stdout --attach --no-attach --thread --thread= --output-directory
|
||||||
|
--numbered --start-number --numbered-files --keep-subject --signoff
|
||||||
|
--signature --no-signature --in-reply-to= --cc= --full-index --binary
|
||||||
|
--not --all --cover-letter --no-prefix --src-prefix= --dst-prefix=
|
||||||
|
--inline --suffix= --ignore-if-in-upstream --subject-prefix=
|
||||||
|
"
|
||||||
|
|
||||||
_git_format_patch ()
|
_git_format_patch ()
|
||||||
{
|
{
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
@ -1126,21 +1134,7 @@ _git_format_patch ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "
|
__gitcomp "$__git_format_patch_options"
|
||||||
--stdout --attach --no-attach --thread --thread=
|
|
||||||
--output-directory
|
|
||||||
--numbered --start-number
|
|
||||||
--numbered-files
|
|
||||||
--keep-subject
|
|
||||||
--signoff --signature --no-signature
|
|
||||||
--in-reply-to= --cc=
|
|
||||||
--full-index --binary
|
|
||||||
--not --all
|
|
||||||
--cover-letter
|
|
||||||
--no-prefix --src-prefix= --dst-prefix=
|
|
||||||
--inline --suffix= --ignore-if-in-upstream
|
|
||||||
--subject-prefix=
|
|
||||||
"
|
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -1554,6 +1548,12 @@ _git_send_email ()
|
|||||||
__gitcomp "ssl tls" "" "${cur##--smtp-encryption=}"
|
__gitcomp "ssl tls" "" "${cur##--smtp-encryption=}"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--thread=*)
|
||||||
|
__gitcomp "
|
||||||
|
deep shallow
|
||||||
|
" "" "${cur##--thread=}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
|
__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
|
||||||
--compose --confirm= --dry-run --envelope-sender
|
--compose --confirm= --dry-run --envelope-sender
|
||||||
@ -1563,11 +1563,12 @@ _git_send_email ()
|
|||||||
--signed-off-by-cc --smtp-pass --smtp-server
|
--signed-off-by-cc --smtp-pass --smtp-server
|
||||||
--smtp-server-port --smtp-encryption= --smtp-user
|
--smtp-server-port --smtp-encryption= --smtp-user
|
||||||
--subject --suppress-cc= --suppress-from --thread --to
|
--subject --suppress-cc= --suppress-from --thread --to
|
||||||
--validate --no-validate"
|
--validate --no-validate
|
||||||
|
$__git_format_patch_options"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
__git_complete_revlist
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_stage ()
|
_git_stage ()
|
||||||
|
@ -288,4 +288,9 @@ test_expect_failure 'complete tree filename with metacharacters' '
|
|||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'send-email' '
|
||||||
|
test_completion "git send-email --cov" "--cover-letter " &&
|
||||||
|
test_completion "git send-email ma" "master "
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user