+
+ See <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of the supported syntax for
+ <<u>search-term</u>>.
+
+ Tags prefixed by '+' are added while those prefixed by '-' are removed.
+ For each message, tag changes are applied in the order they appear on
+ the command line.
+
+ The beginning of the search terms is recognized by the first argument
+ that begins with neither '+' nor '-'. Support for an initial search
+ term beginning with '+' or '-' is provided by allowing the user to
+ specify a "--" argument to separate the tags from the search terms.
+
+ <b>notmuch</b> <b>tag</b> updates the maildir flags according to tag changes if the
+ <b>maildir.synchronize</b>_<b>flags</b> configuration option is enabled. See <a href='../notmuch-config-1/'>not‐</a>
+ <a href='../notmuch-config-1/'>much-config</a>(1) for details.
+
+ Supported options for <b>tag</b> include
+
+ <b>--remove-all</b>
+ Remove all tags from each message matching the search terms
+ before applying the tag changes appearing on the command
+ line. This means setting the tags of each message to the
+ tags to be added. If there are no tags to be added, the mes‐
+ sages will have no tags.
+
+ <b>--batch</b>
+ Read batch tagging operations from a file (stdin by default).
+ This is more efficient than repeated <b>notmuch</b> <b>tag</b> invocations.
+ See <u>TAG</u> <u>FILE</u> <u>FORMAT</u> below for the input format. This option
+ is not compatible with specifying tagging on the command
+ line.
+
+ <b>--input=<filename></b>
+ Read input from given file, instead of from stdin. Implies
+ <b>--batch</b>.