Skip to content

Support aliases for all switches #303

@lespea

Description

@lespea

Currently it seams the aliases tag only works for "commands", would it be possible to enable it for normal flags as well?

type Arg struct {
    TestFlag string `kong:"aliases='alt-flag'"
}

That would let you either run ./cmd --test-flag blah or ./cmd --alt-flag blah and in both cases the TestFlag field would contain blah. Maybe this is already allowed and I'm just doing it wrong but in testing it says the aliases names are an "unknown flag".

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