]> git.cworth.org Git - notmuch/commit
cli: add --remove-all option to "notmuch tag"
authorJani Nikula <jani@nikula.org>
Sat, 9 Mar 2013 14:56:49 +0000 (16:56 +0200)
committerDavid Bremner <bremner@unb.ca>
Sat, 30 Mar 2013 22:33:59 +0000 (18:33 -0400)
commit268666a071db33c5ce6a01b052d9a19c184e10f6
treeb9b611ceed34cfa8f2b0e00d0df0ab6b174a9007
parenta6822eccaca773aa03473bca490618e30dac24ca
cli: add --remove-all option to "notmuch tag"

Add --remove-all option to "notmuch tag" to remove all tags from the
messages matching query before applying the tag changes. This allows
removal of all tags and unconditional setting of the tags of a
message:

$ notmuch tag --remove-all id:foo@example.com
$ notmuch tag --remove-all +foo +bar id:foo@example.com

without having to resort to the complicated (and still quoting
broken):

$ notmuch tag $(notmuch search --output=tags '*' | sed 's/^/-/') \
  id:foo@example.com
$ notmuch tag $(notmuch search --output=tags '*' | sed 's/^/-/') \
  +foo +bar id:foo@example.com
notmuch-tag.c