summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2017-01-26 11:55:23 +0100
committerAurelien Aptel <aaptel@suse.com>2017-01-26 11:55:47 +0100
commit082a36d9710eee2eefff523ec71273834124cb13 (patch)
tree09353ce198a1a610dfd0fe1d9260b90b0c8c3e58
parent2da7433195a99d4254caec4674fbc6dd9b78b6ff (diff)
downloadmailscripts-082a36d9710eee2eefff523ec71273834124cb13.tar.gz
allow multi-terms notmuch queries
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
-rwxr-xr-xnotmuch-extract-patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/notmuch-extract-patch b/notmuch-extract-patch
index d9c18bb..7ccf4bd 100755
--- a/notmuch-extract-patch
+++ b/notmuch-extract-patch
@@ -48,9 +48,9 @@ def is_git_patch(msg):
return ("git-send-email" in msg['x-mailer'] and match)
def main():
- thread_id = sys.argv[1]
+ query = sys.argv[1:]
with tempfile.NamedTemporaryFile() as in_mb_file:
- out = subprocess.check_output(['notmuch', 'show', '--format=mbox', thread_id])
+ out = subprocess.check_output(['notmuch', 'show', '--format=mbox']+query)
in_mb_file.write(out)
in_mb_file.flush()