Add metavariable for positional argument
This commit is contained in:
parent
de59ba6a96
commit
0309812401
10
src/Main.hs
10
src/Main.hs
@ -29,7 +29,9 @@ data Options = Options
|
|||||||
-- | Program arguments parser
|
-- | Program arguments parser
|
||||||
options :: Parser Options
|
options :: Parser Options
|
||||||
options = Options
|
options = Options
|
||||||
<$> strArgument ( help "Namecoin name id" )
|
<$> strArgument
|
||||||
|
( metavar "NAME"
|
||||||
|
<> help "Namecoin name id" )
|
||||||
<*> strOption
|
<*> strOption
|
||||||
( long "url"
|
( long "url"
|
||||||
<> short 'u'
|
<> short 'u'
|
||||||
@ -39,15 +41,15 @@ options = Options
|
|||||||
<*> switch
|
<*> switch
|
||||||
( long "dnschain"
|
( long "dnschain"
|
||||||
<> short 'd'
|
<> short 'd'
|
||||||
<> help "Use dnschain api")
|
<> help "Use dnschain api" )
|
||||||
<*> switch
|
<*> switch
|
||||||
( long "block"
|
( long "block"
|
||||||
<> short 'b'
|
<> short 'b'
|
||||||
<> help "Show blockchain data (require local connection)")
|
<> help "Show blockchain data (require local connection)" )
|
||||||
<*> switch
|
<*> switch
|
||||||
( long "raw"
|
( long "raw"
|
||||||
<> short 'r'
|
<> short 'r'
|
||||||
<> help "Print raw JSON data")
|
<> help "Print raw JSON data" )
|
||||||
|
|
||||||
|
|
||||||
-- | Program description
|
-- | Program description
|
||||||
|
Loading…
Reference in New Issue
Block a user