Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
cblp committed Mar 7, 2020
1 parent bdb0507 commit ab8202c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ff-core/lib/FF/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ data Track

data Contact = Add Text | Delete ContactId

data Config = ConfigDataDir (Maybe DataDir) | ConfigExternalEditor (Maybe FilePath) | ConfigUI (Maybe Shuffle)
data Config
= ConfigDataDir (Maybe DataDir)
| ConfigExternalEditor (Maybe FilePath)
| ConfigUI (Maybe Shuffle)

data DataDir = DataDirJust FilePath | DataDirYandexDisk

Expand Down Expand Up @@ -252,7 +255,8 @@ parser h =
wiki = switch $ long "wiki" <> short 'w' <> help "Handle wiki note"
briefOption =
switch $ long "brief" <> short 'b' <> help "List only note titles and ids"
agenda = Agenda <$> optional limitOption <*> filterTags <*> withoutTagsOption
agenda =
Agenda <$> optional limitOption <*> filterTags <*> withoutTagsOption
filterTags = filterByNoTags <|> Tags <$> filterByTags
track = Track <$> dryRunOption <*> optional repo <*> optional limitOption
dryRunOption =
Expand Down Expand Up @@ -352,7 +356,9 @@ parser h =
<> help "Path to the data dir"
cmdConfig =
fmap CmdConfig . optional . subparser $
command "dataDir" iDataDir <> command "externalEditor" iExternalEditor <> command "ui" iUi
command "dataDir" iDataDir
<> command "externalEditor" iExternalEditor
<> command "ui" iUi
where
iDataDir = i pDataDir "the database directory"
pDataDir = ConfigDataDir <$> optional (pJust <|> pYandexDisk)
Expand All @@ -364,7 +370,9 @@ parser h =
DataDirYandexDisk
(long "yandex-disk" <> short 'y' <> help "detect Yandex.Disk")
iExternalEditor = i pExternalEditor "the external editor to use"
pExternalEditor = ConfigExternalEditor <$> optional (strArgument $ metavar "PATH" <> help "path")
pExternalEditor =
ConfigExternalEditor
<$> optional (strArgument $ metavar "PATH" <> help "path")
iUi = i ui "UI tweaks"
ui =
fmap ConfigUI . optional $
Expand Down

0 comments on commit ab8202c

Please sign in to comment.