MCPcopy
hub / github.com/spf13/cobra / CompletionWithDesc

Function CompletionWithDesc

completions.go:142–144  ·  view source on GitHub ↗

CompletionWithDesc returns a [Completion] with a description by using the TAB delimited format.

(choice string, description string)

Source from the content-addressed store, hash-verified

140
141// CompletionWithDesc returns a [Completion] with a description by using the TAB delimited format.
142func CompletionWithDesc(choice string, description string) Completion {
143 return choice + "\t" + description
144}
145
146// NoFileCompletions can be used to disable file completion for commands that should
147// not trigger file completions.

Callers 4

getCompletionsMethod · 0.85
getFlagNameCompletionsFunction · 0.85
InitDefaultHelpCmdMethod · 0.85

Calls

no outgoing calls