diff --git a/ff-core/lib/FF/Options.hs b/ff-core/lib/FF/Options.hs index 31c4fbc0..767dff2f 100644 --- a/ff-core/lib/FF/Options.hs +++ b/ff-core/lib/FF/Options.hs @@ -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 @@ -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 = @@ -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) @@ -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 $