lambdaisland / cli

Opinionated command line argument handling, with excellent support for subcommands
Mozilla Public License 2.0
22 stars 1 forks source link

Flags require capitalization? Bug or feature? #5

Open ieugen opened 3 months ago

ieugen commented 3 months ago

Hi,

I encountered this during my cli implementation. This is not specified anywhere in the documentation.

Using the bellow

:flags ["--name string" "A name option - lower case `string` does not get parsed"]

;; gets me
[FATAL] Unknown flag:  --name

Using capitalized version works ok

:flags ["--name STRING" "A name option - lower case `string` does not get parsed"]
plexus commented 3 months ago

Yes, this is by design. This follows the connections I've seen "in the wild", this is the "classic" way of doing things, in all caps, or we also support the "modern" way, eg --name <string>.

A PR for the README to point that out would be most welcome.