fsprojects / Argu

A declarative CLI argument parser for F#
https://fsprojects.github.io/Argu
MIT License
457 stars 74 forks source link

Case insensitivity of command options names #155

Closed costa100 closed 3 years ago

costa100 commented 4 years ago

This is a feature suggestion (that is unless this is already implemented and I missed it).

Please implement a way to make options names case insensitive.

Example:

type CliArguments =
    | SqlObjectNames of string list

This translates to the command option

--sqlobjectnames [...]

The user of my console utility has to write exactly --sqlobjectnames. It would be nice if the parser allowed by default --sqlObjectNames as well.

Thanks

eiriktsarpalis commented 3 years ago

Please see my response in the corresponding PR: https://github.com/fsprojects/Argu/pull/158#issuecomment-731216799

My recommendation would be to adopting a POSIX compliant syntax, in this case --sql-object-names. This can be achieved by naming the union case Sql_Object_Names.