From 0309812401df164a40d4cc36d411aa15c5010be4 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Thu, 5 May 2016 18:11:51 +0200 Subject: [PATCH] Add metavariable for positional argument --- src/Main.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 715353b..7609acd 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -29,7 +29,9 @@ data Options = Options -- | Program arguments parser options :: Parser Options options = Options - <$> strArgument ( help "Namecoin name id" ) + <$> strArgument + ( metavar "NAME" + <> help "Namecoin name id" ) <*> strOption ( long "url" <> short 'u' @@ -39,15 +41,15 @@ options = Options <*> switch ( long "dnschain" <> short 'd' - <> help "Use dnschain api") + <> help "Use dnschain api" ) <*> switch ( long "block" <> short 'b' - <> help "Show blockchain data (require local connection)") + <> help "Show blockchain data (require local connection)" ) <*> switch ( long "raw" <> short 'r' - <> help "Print raw JSON data") + <> help "Print raw JSON data" ) -- | Program description