You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to get a -v flag working on its own but also allow passing it an argument, such as -vn?
Many command-line utilities support this idiom (e.g. ghc), but I haven't been able to get it to work with optparse-applicative. I tried the following (and a few different variations):
option auto
(long "verbose"
<> short 'v'
<> metavar "LEVEL"
<> help "Set the verbosity level to LEVEL")
<|>
flag 0 1
(long "verbose"
<> short 'v'
<> help "Enable verbose mode")
but it seems like the option takes precedence.
Cheers!
The text was updated successfully, but these errors were encountered:
Hey, and thanks for an excellent library!
Is there any way to get a
-v
flag working on its own but also allow passing it an argument, such as-vn
?Many command-line utilities support this idiom (e.g.
ghc
), but I haven't been able to get it to work withoptparse-applicative
. I tried the following (and a few different variations):but it seems like the
option
takes precedence.Cheers!
The text was updated successfully, but these errors were encountered: