1
0
Fork 0
mirror of https://github.com/malob/prefmanager.git synced 2024-12-14 11:57:49 +00:00

Add list-domains command

This commit is contained in:
Malo Bourgon 2020-08-21 16:33:46 -07:00
parent 139f6ff959
commit fa8eb3416c
2 changed files with 22 additions and 19 deletions

View file

@ -1,2 +0,0 @@
import Distribution.Simple
main = defaultMain

View file

@ -20,7 +20,7 @@ opts = info
-- | App CLI commands
commands :: Parser (IO ())
commands = hsubparser
(command "watch"
( command "watch"
(info
( watch . S.fromList <$> some
(Domain <$> strArgument
@ -35,6 +35,11 @@ commands = hsubparser
<> help "Watch all domains including NSGlobalDomain"
)
)
(progDesc "Watch domain(s) for changes")
$ progDesc "Watch domain(s) for changes"
)
<> command "list-domains"
(info
(pure $ S.toList <$> domains >>= mapM_ (putStrLn . coerce))
(progDesc "List all domains")
)
)