Improve help message
This commit is contained in:
parent
bf5bfd1441
commit
7dd2a0bdad
1 changed files with 10 additions and 10 deletions
20
app/Main.hs
20
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue