Don't complete hidden flags
This commit is contained in:
parent
1d7a2b08d6
commit
62f02f21ef
3
help.go
3
help.go
@ -199,6 +199,9 @@ func printFlagSuggestions(lastArg string, flags []Flag, writer io.Writer) {
|
||||
cur := shortFlagRegex.ReplaceAllString(lastArg, "")
|
||||
cur = shortFlagRegex.ReplaceAllString(cur, "")
|
||||
for _, flag := range flags {
|
||||
if bflag, ok := flag.(BoolFlag); ok && bflag.Hidden {
|
||||
continue
|
||||
}
|
||||
for _, name := range strings.Split(flag.GetName(), ",") {
|
||||
name = strings.Trim(name, " ")
|
||||
count := utf8.RuneCountInString(name)
|
||||
|
Loading…
Reference in New Issue
Block a user