mirror of
https://github.com/spf13/cobra
synced 2025-04-10 16:57:19 +00:00
fix: completion helper retro-compatibility
Signed-off-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
This commit is contained in:
parent
a70785a303
commit
7223f0f926
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ type CompletionOptions struct {
|
||||||
type Completion = string
|
type Completion = string
|
||||||
|
|
||||||
// CompletionFunc is a function that provides completion results.
|
// CompletionFunc is a function that provides completion results.
|
||||||
type CompletionFunc func(cmd *Command, args []string, toComplete string) ([]Completion, ShellCompDirective)
|
type CompletionFunc = func(cmd *Command, args []string, toComplete string) ([]Completion, ShellCompDirective)
|
||||||
|
|
||||||
// CompletionWithDesc returns a [Completion] with a description by using the TAB delimited format.
|
// CompletionWithDesc returns a [Completion] with a description by using the TAB delimited format.
|
||||||
func CompletionWithDesc(choice string, description string) Completion {
|
func CompletionWithDesc(choice string, description string) Completion {
|
||||||
|
|
Loading…
Add table
Reference in a new issue