]> git.cworth.org Git - notmuch/commit
cli: add support for batch tagging operations to "notmuch tag"
authorJani Nikula <jani@nikula.org>
Tue, 25 Dec 2012 19:42:40 +0000 (15:42 -0400)
committerDavid Bremner <bremner@debian.org>
Tue, 8 Jan 2013 00:48:54 +0000 (20:48 -0400)
commit3f9cc3d082b812d2c96a2326786501056cd4caca
tree18118841f2445164d1f48b6554a82387fddd0ed3
parente9b6e464745fdebd4c6367dfc731859fe390b531
cli: add support for batch tagging operations to "notmuch tag"

Add support for batch tagging operations through stdin to "notmuch
tag". This can be enabled with the new --batch command line option to
"notmuch tag". The input must consist of lines of the format:

+<tag>|-<tag> [...] [--] <query> [...]

Each line is interpreted similarly to "notmuch tag" command line
arguments. The delimiter is one or more spaces ' '. Any characters in
<tag> MAY be hex encoded with %NN where NN is the hexadecimal value of
the character. Any ' ' and '%' characters in <tag> and MUST be hex
encoded (using %20 and %25, respectively). For future-proofing, any
'"' characters in <tag> SHOULD be hex-encoded.

Any characters that are not part of <tag> or
MUST NOT be hex encoded.

<query> is passed verbatim to Xapian

Leading and trailing space ' ' is ignored. Empty lines and lines
beginning with '#' are ignored.

Signed-off-by: Jani Nikula <jani@nikula.org>
Hacked-like-crazy-by: David Bremner <david@tethera.net>
notmuch-tag.c