mirror of
https://github.com/spf13/cobra
synced 2025-04-06 23:09:12 +00:00
Refactor HasCustomFlagCompletion method documentation for clarity on custom flag completions
This commit is contained in:
parent
39a6bbba47
commit
f59f7ace14
1 changed files with 4 additions and 3 deletions
|
@ -1607,10 +1607,11 @@ func (c *Command) HasSubCommands() bool {
|
||||||
return len(c.commands) > 0
|
return len(c.commands) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsAvailableCommand determines if a command is available as a non-help command
|
// HasCustomFlagCompletion determines if a command has a defined
|
||||||
// (this includes all non deprecated/hidden commands).
|
// ValidArgsFunction, if it does, then it returns the value of
|
||||||
|
// the AllowCustomFlagCompletions field indicating if the function
|
||||||
|
// should be used for handling custom flag completions.
|
||||||
func (c *Command) HasCustomFlagCompletion() bool {
|
func (c *Command) HasCustomFlagCompletion() bool {
|
||||||
|
|
||||||
if c.ValidArgsFunction == nil {
|
if c.ValidArgsFunction == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue