]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.c
notmuch: Add a 'part' subcommand
[notmuch] / notmuch.c
index 95f057eae21b2289df61cc373b354fe0885a07a6..6ebe36dbc64ab9d167af8631f5e16614eb6b287f 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -294,6 +294,17 @@ command_t commands[] = {
       "\t\tcontain tags only from messages that match the search-term(s).\n"
       "\n"
       "\t\tIn both cases the list will be alphabetically sorted." },
+    { "part", notmuch_part_command,
+      "--part=<num> <search-terms>",
+      "\t\tOutput a single MIME part of a message.",
+      "\t\tA single decoded MIME part, with no encoding or framing,\n"
+      "\t\tis output to stdout. The search terms must match only a single\n"
+      "\t\tmessage, otherwise this command will fail.\n"
+      "\n"
+      "\t\tThe part number should match the part \"id\" field output\n"
+      "\t\tby the \"--format=json\" option of \"notmuch show\". If the\n"
+      "\t\tmessage specified by the search terms does not include a\n"
+      "\t\tpart with the specified \"id\" there will be no output." },
     { "help", notmuch_help_command,
       "[<command>]",
       "\t\tThis message, or more detailed help for the named command.",