diff --git a/src/Main.hs b/src/Main.hs index 25b0704..c1a8fc6 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -90,7 +90,10 @@ search ProgArgs {..} = do let res = if null exactMatches then select (fuzzy searchTerm items) else select (byAttrib (Left exactMatches, Str searchTerm) items) - if contentOnly - then mapM_ putStrLn (map content res) - else pprint res - when (not noClipboard) (sendClipboard (content $ head res)) + if null res + then putStrLn "No results found" + else do + if contentOnly + then mapM_ putStrLn (map content res) + else pprint res + when (not noClipboard) (sendClipboard (content $ head res))