diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-09-18 16:38:01 -0300 |
---|---|---|
committer | Silvio Rhatto <user@example.org> | 2014-09-18 16:38:01 -0300 |
commit | f32ec8c49226dc860c38a2c36d7587d1d27419b8 (patch) | |
tree | 838eb53acda78197891e29b932aa1494bab249a1 /mutt-notmuch-tag | |
download | utils-mail-f32ec8c49226dc860c38a2c36d7587d1d27419b8.tar.gz utils-mail-f32ec8c49226dc860c38a2c36d7587d1d27419b8.tar.bz2 |
Initial import
Diffstat (limited to 'mutt-notmuch-tag')
-rwxr-xr-x | mutt-notmuch-tag | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mutt-notmuch-tag b/mutt-notmuch-tag new file mode 100755 index 0000000..9b80a19 --- /dev/null +++ b/mutt-notmuch-tag @@ -0,0 +1,21 @@ +# mutt-notmuch-tag.sh +# Simple and crude script to tag multiple messagess in mutt using notmuch. +# See http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/ + +grep "Message-ID" - > temp.txt +sed -e 's|Message-ID:.*<\(.*\)>.*|id:\1|' temp.txt > temp1.txt +sed '{:q;N;s/\n/ OR /g;t q}' temp1.txt > temp2.txt + +## When vi opens up list the tagging commands, e.g. +tag1 -tag2 +vi tags.txt + +TAGS=`cat tags.txt` +SEARCHEXPR=`cat temp2.txt` + +## For debugging +echo "notmuch tag $TAGS -- $SEARCHEXPR" >> temp2.txt + +## Now apply the tags +notmuch tag $TAGS -- $SEARCHEXPR + +# End of mutt-notmuch-tag.sh |