completion: complete values for send-email
Add completion for --confirm, --suppress-cc, and --smtp-encryption command line arguments. Add completion for aliasfiletype and confirm configuration variables. Since --smtp-ssl is deprecated, replace it with --smtp-encryption and the two options ssl and tls. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
672c68cbb9
commit
ae616de6d5
@ -1282,18 +1282,39 @@ _git_rebase ()
|
|||||||
__gitcomp "$(__git_refs)"
|
__gitcomp "$(__git_refs)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__git_send_email_confirm_options="always never auto cc compose"
|
||||||
|
__git_send_email_suppresscc_options="author self cc ccbody sob cccmd body all"
|
||||||
|
|
||||||
_git_send_email ()
|
_git_send_email ()
|
||||||
{
|
{
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
|
--confirm=*)
|
||||||
|
__gitcomp "
|
||||||
|
$__git_send_email_confirm_options
|
||||||
|
" "" "${cur##--confirm=}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--suppress-cc=*)
|
||||||
|
__gitcomp "
|
||||||
|
$__git_send_email_suppresscc_options
|
||||||
|
" "" "${cur##--suppress-cc=}"
|
||||||
|
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--smtp-encryption=*)
|
||||||
|
__gitcomp "ssl tls" "" "${cur##--smtp-encryption=}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
|
__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
|
||||||
--compose --dry-run --envelope-sender --from --identity
|
--compose --confirm= --dry-run --envelope-sender
|
||||||
|
--from --identity
|
||||||
--in-reply-to --no-chain-reply-to --no-signed-off-by-cc
|
--in-reply-to --no-chain-reply-to --no-signed-off-by-cc
|
||||||
--no-suppress-from --no-thread --quiet
|
--no-suppress-from --no-thread --quiet
|
||||||
--signed-off-by-cc --smtp-pass --smtp-server
|
--signed-off-by-cc --smtp-pass --smtp-server
|
||||||
--smtp-server-port --smtp-ssl --smtp-user --subject
|
--smtp-server-port --smtp-encryption= --smtp-user
|
||||||
--suppress-cc --suppress-from --thread --to
|
--subject --suppress-cc= --suppress-from --thread --to
|
||||||
--validate --no-validate"
|
--validate --no-validate"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@ -1355,6 +1376,18 @@ _git_config ()
|
|||||||
__gitcomp "$__git_log_date_formats"
|
__gitcomp "$__git_log_date_formats"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
sendemail.aliasesfiletype)
|
||||||
|
__gitcomp "mutt mailrc pine elm gnus"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
sendemail.confirm)
|
||||||
|
__gitcomp "$__git_send_email_confirm_options"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
sendemail.suppresscc)
|
||||||
|
__gitcomp "$__git_send_email_suppresscc_options"
|
||||||
|
return
|
||||||
|
;;
|
||||||
*.*)
|
*.*)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user