Add --help to every subcommand

main
staticvoid 2022-06-29 14:52:29 +03:00
parent 8d7a8d3e56
commit 1975fc3eda
1 changed files with 6 additions and 3 deletions

View File

@ -40,18 +40,21 @@ choiceParser :: Parser Choice
choiceParser = foldl1 (<|>)
[ subparser
(command "ss" (info
(pure GetSections)
(pure GetSections
<**> helper)
(progDesc "Request list of sections")))
, subparser
(command "ts" (info
(GetTopics <$> (Just <$> option auto (metavar "MAX_ENTRIES_NUMBER"
<> long "max-entries"
<> short 'm'
<> help "max number of entries")))
<> help "max number of entries"))
<**> helper)
(progDesc "Request list of topics")))
, subparser
(command "t" (info
(GetTopic <$> argument auto (metavar "TOPIC_ID"))
(GetTopic <$> argument auto (metavar "TOPIC_ID")
<**> helper)
(progDesc "Request a topic")))
]