commander
commander copied to clipboard
support `--` for negative number and other input with dash
When use --
to supports negative number, it only support one digit like -5
, and not support -500
. it Will treat -500
as short flag. So i just make the argument after --
as an entirety. now it support flag like this:
$ ./test -r a -ov -- -help --halo
required: a
optional: (null)
verbose: enabled
additional args:
- '-help'
- '--halo'
It will not treat -help
as -h
,-e
, -l
,-p
.