]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-show.c
emacs: add a filter option to show
[notmuch] / notmuch-show.c
index d416fbd5ccb73593ec44fd976bd331de0bf13be6..b80933ad3a00963e07047c56707863291d9e321e 100644 (file)
@@ -1082,7 +1082,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
        .output_body = TRUE,
        .crypto = {
            .verify = FALSE,
-           .decrypt = FALSE
+           .decrypt = FALSE,
+           .gpgpath = NULL
        },
        .include_html = FALSE
     };
@@ -1113,6 +1114,7 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
        { NOTMUCH_OPT_BOOLEAN, &params.crypto.verify, "verify", 'v', 0 },
        { NOTMUCH_OPT_BOOLEAN, &params.output_body, "body", 'b', 0 },
        { NOTMUCH_OPT_BOOLEAN, &params.include_html, "include-html", 0, 0 },
+       { NOTMUCH_OPT_INHERIT, (void *) &notmuch_shared_options, NULL, 0, 0 },
        { 0, 0, 0, 0, 0 }
     };
 
@@ -1120,6 +1122,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     if (opt_index < 0)
        return EXIT_FAILURE;
 
+    notmuch_process_shared_options (argv[0]);
+
     /* decryption implies verification */
     if (params.crypto.decrypt)
        params.crypto.verify = TRUE;
@@ -1203,6 +1207,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
        return EXIT_FAILURE;
     }
 
+    params.crypto.gpgpath = notmuch_config_get_crypto_gpg_path (config);
+
     if (notmuch_database_open (notmuch_config_get_database_path (config),
                               NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch))
        return EXIT_FAILURE;