-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Discovered the following bug today. I haven't really explored it, but below is a seemingly minimal example:
import Options.Applicative
data Opt = A | B
opts :: Parser Opt
opts = flag' A (long "test") <|> flag' B (long "test1")
main :: IO ()
main = () <$ customExecParser (prefs disambiguate) (info opts mempty)Let's call this program test. Running test --test yields:
Invalid option `--test'
Did you mean one of these?
--test
--test1
Usage: test (--test | --test1)
However, test --test1 executes just fine. Furthermore, replacing main by
main = () <$ execParser (info opts mempty)parses either option just fine.
I've tried this with the latest versions (0.16.0.0 and 0.16.0.1) and also hopped back to 0.15.0.0 just to see if there was any difference.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels