kong icon indicating copy to clipboard operation
kong copied to clipboard

Support aliases for all switches

Open lespea opened this issue 3 years ago • 0 comments

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".

lespea avatar May 04 '22 20:05 lespea