mirror of
https://github.com/spf13/cobra
synced 2025-04-07 15:29:16 +00:00
Add AllowCustomFlagCompletions field to Command struct for enhanced flag completion handling
This commit is contained in:
parent
1995054b00
commit
3736e5e7b8
1 changed files with 5 additions and 0 deletions
|
@ -257,6 +257,11 @@ type Command struct {
|
|||
// SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions.
|
||||
// Must be > 0.
|
||||
SuggestionsMinimumDistance int
|
||||
|
||||
// When performing commandline completions specific to handling flags only, override
|
||||
// Cobra's default behavior and allow ValidArgsFunction to be used if it exists, otherwise
|
||||
// use the default behavior
|
||||
AllowCustomFlagCompletions bool
|
||||
}
|
||||
|
||||
// Context returns underlying command context. If command was executed
|
||||
|
|
Loading…
Reference in a new issue