-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Description
Argu does not accept camel case command line parameters and it doesn't seem to be possible to enable case insensitive matches when parsing.
Repro steps
Run the following code snippet:
open Argu
type CliArguments =
| LogLevel of level: int
| Quit
interface IArgParserTemplate with
member s.Usage =
match s with
| LogLevel _ -> "set the log level."
| Quit -> "just quit."
let parser = ArgumentParser.Create<CliArguments>(programName = "test")
let res = parser.Parse [| "--loglevel"; "3" |] // works
let results = parser.Parse [| "--logLevel"; "3" |] // throws "Unhandled exception. Argu.ArguParseException: ERROR: unrecognized argument: '--logLevel'."
Expected behavior
Parser should accept both --loglevel
and --logLevel
or allow users to configure this behavior e.g. ArgumentParser.Create<CliArguments>(programName = "test", matchCase = false)
Actual behavior
The parser fails when provided with any command line parameter which is not lowercase.
Known workarounds
No workarounds.
Related information
- Operating system: Linux
- Branch: master
- .NET Runtime, CoreCLR or Mono Version: .NET 9
Metadata
Metadata
Assignees
Labels
No labels