diff --git a/src/Main.hs b/src/Main.hs index f0b55e0..7945501 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -13,18 +13,9 @@ import System.Console.ArgParser -- Search functions -- -byServer :: String -> Keychain -> [Item] -byServer s = byAttrib (Left "srv", Str s) - -byAccount :: String -> Keychain -> [Item] -byAccount a = byAttrib (Left "acct", Str a) - byAttrib :: Attrib -> Keychain -> [Item] byAttrib a = filter (elem a . attrs) -attrib :: Name -> Item -> Maybe Value -attrib a = lookup a . attrs - fuzzy :: String -> Keychain -> [Item] fuzzy x = filter (any (isInfixOf x) . strings) where @@ -102,5 +93,3 @@ search ProgArgs {..} = do then mapM_ print (map content res) else pprint res when (not noClipboard) (sendClipboard (content $ head res)) - -