From 1975fc3edaa89f380c8ed0925af01012b9a9a083 Mon Sep 17 00:00:00 2001 From: staticvoid Date: Wed, 29 Jun 2022 14:52:29 +0300 Subject: [PATCH] Add --help to every subcommand --- app/Cli.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Cli.hs b/app/Cli.hs index 2cd4d4b..b909c00 100644 --- a/app/Cli.hs +++ b/app/Cli.hs @@ -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"))) ]