Short flags should be combined
lespea opened this issue · 1 comments
Describe what you want
Short flags should be able to be joined in one group
Why is it necessary
Very common practice for short args to be grouped, saves a lot of typing when doing multiple flags
Test case examples [Optional]
If the Flags -s
and -t
are added, then you should be able to call the binary with -st
to specify that both the s
and t
flags are set. This can get tricky if you want to support non-flags (most likely in the trailing position) so you could do something like -stn10
or maybe -stn 10
if -n
was an Int
argument.
It's an idea, but it would confuse user a lot. When I start the project, I wondered if I should do so.
but since there's no length limit on short args, -stn
is just one short args
parser.Int("stn", "", nil) // it will accept '-stn 10'
I guess I'll wonder a little more to complete this feature