Improve help message

This commit is contained in:
Joscha 2018-03-18 19:46:11 +00:00
parent bf5bfd1441
commit 7dd2a0bdad

View file

@ -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