From 5f78ec96b34fe96b933d079776a24f2b23e767a3 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 30 Apr 2017 15:24:03 +0200 Subject: Notmuch.search: support passing additional args --- Notmuch.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Notmuch.hs') diff --git a/Notmuch.hs b/Notmuch.hs index e6d0d32..ffe403d 100644 --- a/Notmuch.hs +++ b/Notmuch.hs @@ -140,9 +140,9 @@ notmuchWithInput args input = do return (exitCode, out, err) -search :: String -> IO (Either String [SearchResult]) -search term = - notmuch [ "search", "--format=json", "--format-version=2", term ] +search :: [String] -> IO (Either String [SearchResult]) +search args = + notmuch ("search" : "--format=json" : "--format-version=2" : args) >>= return . eitherDecode' -- cgit v1.2.3