X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=75cf7ecb5068534df678e37fd0a606cd6215739e;hp=eec34bed9fcb80c5c51e27a29b74b3c35d0bee5c;hb=460749d357225324bb1b752b858bfdba1c13f7bf;hpb=798aa789b5d117cf11697bc97dd982bd5a2c2ac8 diff --git a/notmuch-reply.c b/notmuch-reply.c index eec34bed..75cf7ecb 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -700,11 +700,10 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]) int opt_index; notmuch_show_params_t params = { .part = -1, - .crypto = { .decrypt = NOTMUCH_DECRYPT_FALSE }, + .crypto = { .decrypt = NOTMUCH_DECRYPT_AUTO }, }; int format = FORMAT_DEFAULT; int reply_all = true; - bool decrypt = false; notmuch_opt_desc_t options[] = { { .opt_keyword = &format, .name = "format", .keywords = @@ -718,7 +717,12 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]) (notmuch_keyword_t []){ { "all", true }, { "sender", false }, { 0, 0 } } }, - { .opt_bool = &decrypt, .name = "decrypt" }, + { .opt_keyword = (int*)(¶ms.crypto.decrypt), .name = "decrypt", + .keyword_no_arg_value = "true", .keywords = + (notmuch_keyword_t []){ { "false", NOTMUCH_DECRYPT_FALSE }, + { "auto", NOTMUCH_DECRYPT_AUTO }, + { "true", NOTMUCH_DECRYPT_NOSTASH }, + { 0, 0 } } }, { .opt_inherit = notmuch_shared_options }, { } }; @@ -728,8 +732,6 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]) return EXIT_FAILURE; notmuch_process_shared_options (argv[0]); - if (decrypt) - params.crypto.decrypt = NOTMUCH_DECRYPT_TRUE; notmuch_exit_if_unsupported_format ();