Bump versions and multiple queries

This commit is contained in:
MasseR committed 2021-10-27 20:46:23 +03:00
1 parent eb16640f41
commit 8e57921a1b
8 files changed
+58 -22

No files matched your search

+2 -1
View File
@@ -21,6 +21,7 @@ import qualified Operations
import Data.Query
(Field(..))
import qualified Options.Applicative.NonEmpty as NE
commands :: Parser (BuukaM ())
commands = subparser
@@ -34,7 +35,7 @@ commands = subparser
f <$> strOption (long "url" <> short 'u' <> metavar "URL")
<*> optional (strOption (long "title"))
queryOpts f =
uncurry f <$> asum [tagged Title "title", tagged Url "url"]
f <$> NE.some1 (asum [tagged Title "title", tagged Url "url"])
tagged t x = (t, ) <$> strOption (long x <> metavar "REGEX")
main :: IO ()