Skip to content

Commit 7c9ab2a

Browse files
Cover a bunch of edge cases, most of which already passed (#207)
1 parent dc39b9d commit 7c9ab2a

2 files changed

Lines changed: 605 additions & 2 deletions

File tree

internal/flag/set.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ func (s *Set) parseSingleShortFlag(shorthands string, rest []string) (string, []
351351
}
352352

353353
switch {
354-
case len(shorthands) > 2 && shorthands[1] == '=':
355-
// '-f=value'
354+
case len(shorthands) >= 2 && shorthands[1] == '=':
355+
// '-f=value' (value may be empty, symmetric with '--flag=')
356356
value := shorthands[2:]
357357

358358
err := flag.Set(value)

0 commit comments

Comments
 (0)