We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afd23df commit 4f29af7Copy full SHA for 4f29af7
help.go
@@ -190,9 +190,8 @@ func cliArgContains(flagName string, args []string) bool {
190
}
191
192
func printFlagSuggestions(lastArg string, flags []Flag, writer io.Writer) {
193
- // Trim the prefix twice to handle both "-short" and "--long" flags.
194
- cur := strings.TrimPrefix(lastArg, "-")
195
- cur = strings.TrimPrefix(cur, "-")
+ // Trim to handle both "-short" and "--long" flags.
+ cur := strings.TrimLeft(lastArg, "-")
196
for _, flag := range flags {
197
if bflag, ok := flag.(*BoolFlag); ok && bflag.Hidden {
198
continue
0 commit comments