From 7dd2a0bdadf9546e72b32ac664caa3e28ea4bb71 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 18 Mar 2018 19:46:11 +0000 Subject: [PATCH] Improve help message --- app/Main.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index f2c0e3b..37aa6e9 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -12,15 +12,22 @@ import qualified Options.Applicative as O import qualified TaskMachine.UI as TM data Options = Options - { oExportDefaultTheme :: [String] - , oThemePaths :: [FilePath] + { oThemePaths :: [FilePath] + , oExportDefaultTheme :: [String] } deriving (Show) argParser :: O.Parser Options argParser = pure Options - <*> many exportDefaultTheme <*> many themePaths + <*> many exportDefaultTheme where + themePaths = O.strOption $ mconcat + [ O.short 't' + , O.long "theme" + , O.help "Specify one or more theme files to load.\ + \ This flag can be set zero or more times." + , O.metavar "THEMEFILE" + ] exportDefaultTheme = O.strOption $ mconcat [ O.short 'T' , O.long "export-default-theme" @@ -28,13 +35,6 @@ argParser = pure Options \ This can be used as a starting point for a custom theme." , O.metavar "THEMEFILE" ] - themePaths = O.strOption $ mconcat - [ O.short 't' - , O.long "theme" - , O.help "Specify one or more theme files to load.\ - \ This flag can be set zero or more times." - , O.metavar "THEME" - ] argParserInfo :: O.ParserInfo Options argParserInfo = O.info (O.helper <*> argParser) mempty