X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=5cdf642be2ce276fd47630fec3df92cf4fa89e16;hp=2c7cc4eba674c7cd761a5532ccb67dd55ad8a2b9;hb=f2a6790583825ffe3c564582f9a93a6c50d8430a;hpb=88f2a72ef1dcfce149bbac776652ea04e564726d diff --git a/notmuch-reply.c b/notmuch-reply.c index 2c7cc4eb..5cdf642b 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -700,9 +700,12 @@ 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_AUTO }, }; int format = FORMAT_DEFAULT; int reply_all = true; + bool decrypt = false; + bool decrypt_set = false; notmuch_opt_desc_t options[] = { { .opt_keyword = &format, .name = "format", .keywords = @@ -716,7 +719,7 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]) (notmuch_keyword_t []){ { "all", true }, { "sender", false }, { 0, 0 } } }, - { .opt_bool = ¶ms.crypto.decrypt, .name = "decrypt" }, + { .opt_bool = &decrypt, .name = "decrypt", .present = &decrypt_set }, { .opt_inherit = notmuch_shared_options }, { } }; @@ -726,6 +729,8 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]) return EXIT_FAILURE; notmuch_process_shared_options (argv[0]); + if (decrypt_set) + params.crypto.decrypt = decrypt ? NOTMUCH_DECRYPT_NOSTASH : NOTMUCH_DECRYPT_FALSE; notmuch_exit_if_unsupported_format ();