diff options
-rw-r--r-- | Notmuch.hs | 6 | ||||
-rw-r--r-- | TreeView.hs | 2 | ||||
-rw-r--r-- | test5.hs | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -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' diff --git a/TreeView.hs b/TreeView.hs index fad16fe..923212d 100644 --- a/TreeView.hs +++ b/TreeView.hs @@ -158,7 +158,7 @@ loadSubForest = \case . subForest . fromSearchResults s . either error id - <$> Notmuch.search s + <$> Notmuch.search [s] _ -> return $ Right [] @@ -83,7 +83,7 @@ data State = State initState :: String -> IO State initState query = do - r_ <- either error id <$> Notmuch.search query + r_ <- either error id <$> Notmuch.search [query] return State { cursor = Z.fromTree $ fromSearchResults query r_ |