Skip to content

Doing long-only options is awkward #18

@jordansissel

Description

@jordansissel

Best way I found to do long-only options in commander is this hack:

program.option(", --some-option <value>", ...)

The hack here is leading with a comma, so the Option object properly splits and sees --some-option is a long flag. Without the leading ", " it will see --some-option as the short flag and as the long one - kind of stuck my brain for a minute when I saw it first ;)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions