Skip to content

Support options with only a short flag #1249

@shadowspawn

Description

@shadowspawn

Commander originally expected there would always be both short and long flags for each option. Support got added for long-only (#18).

Things almost work if you do try defining only a short flag, but by accident, and the value for -a ends up getting stored for A.

.option(`-d`, `debug`)

(The simple work-around is to add a long flag, so this may not be much of an issue in practice as has not been raised in issues here. It did get mentioned as a minor annoyance in a good comparison article in 2018: https://pantas.net/node_argument_parsers/ )

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions