summaryrefslogtreecommitdiffstats
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-10-31 10:54:32 +1100
committerDavid Bremner <david@tethera.net>2018-11-24 09:12:30 -0400
commitbaa4185c302a246e632054dc6becb46c0024b99d (patch)
treeee62be9aa6ce519483da1b3166451d4b72840320 /notmuch-show.c
parent37e5bc00aeb9123dd88367b7506a19f74877dfe4 (diff)
cli: notmuch show support for --include-html with --format=text
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 42fe27cc..07e9a5db 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -584,7 +584,8 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,
if (leaf) {
if (g_mime_content_type_is_type (content_type, "text", "*") &&
- !g_mime_content_type_is_type (content_type, "text", "html"))
+ (params->include_html ||
+ ! g_mime_content_type_is_type (content_type, "text", "html")))
{
show_text_part_content (node->part, stream, 0);
} else {
@@ -1218,8 +1219,10 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
}
if (params.include_html &&
- (format != NOTMUCH_FORMAT_JSON && format != NOTMUCH_FORMAT_SEXP)) {
- fprintf (stderr, "Warning: --include-html only implemented for format=json and format=sexp\n");
+ (format != NOTMUCH_FORMAT_TEXT &&
+ format != NOTMUCH_FORMAT_JSON &&
+ format != NOTMUCH_FORMAT_SEXP)) {
+ fprintf (stderr, "Warning: --include-html only implemented for format=text, format=json and format=sexp\n");
}
query_string = query_string_from_args (config, argc-opt_index, argv+opt_index);