From 2f8871df6ea3c0b44f85a0fc1b4f58a6b70b0a0e Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Mon, 23 May 2011 15:31:32 -0700 Subject: New part output handling as option to notmuch-show. Outputting of single MIME parts is moved to an option of notmuch show, instead of being handled in it's own sub-command. The recent rework of multipart mime allowed for this change but consolidating part handling into a single recursive function (show_message_part) that includes formatting. This allows for far simpler handling single output of a single part, including formatting. --- notmuch.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'notmuch.c') diff --git a/notmuch.c b/notmuch.c index 098f7335..2e98f25d 100644 --- a/notmuch.c +++ b/notmuch.c @@ -269,6 +269,15 @@ command_t commands[] = { "\t\tdecoding and similar functions. This format must only\n" "\t\tbe used with search terms matching a single message.\n" "\n" + "\t--part=N\n" + "\n" + "\t\tOutput the single decoded MIME part N of a single message.\n" + "\t\tThe search terms must match only a single message.\n" + "\t\tMessage parts are numbered in a depth-first walk of the\n" + "\t\tmessage MIME structure, and are identified in the 'json' or\n" + "\t\t'text' output formats.\n" + "\n" + "\n" "\tA common use of \"notmuch show\" is to display a single\n" "\tthread of email messages. For this, use a search term of\n" "\t\"thread:\" as can be seen in the first column\n" @@ -358,17 +367,6 @@ command_t commands[] = { "\tcontain tags only from messages that match the search-term(s).\n" "\n" "\tIn both cases the list will be alphabetically sorted." }, - { "part", notmuch_part_command, - "--part= ", - "Output a single MIME part of a message.", - "\tA single decoded MIME part, with no encoding or framing,\n" - "\tis output to stdout. The search terms must match only a single\n" - "\tmessage, otherwise this command will fail.\n" - "\n" - "\tThe part number should match the part \"id\" field output\n" - "\tby the \"--format=json\" option of \"notmuch show\". If the\n" - "\tmessage specified by the search terms does not include a\n" - "\tpart with the specified \"id\" there will be no output." }, { "config", notmuch_config_command, "[get|set]
. [value ...]", "Get or set settings in the notmuch configuration file.", -- cgit v1.2.3