21 lines
570 B
Go
21 lines
570 B
Go
package ckprompt
|
|
|
|
import commandkit "go.maximumdirect.net/commandkit"
|
|
|
|
func completionChoices(values ...string) commandkit.CompletionHint {
|
|
choices := make([]commandkit.CompletionChoice, len(values))
|
|
for i, value := range values {
|
|
choices[i].Value = value
|
|
}
|
|
return commandkit.CompleteChoices(choices...)
|
|
}
|
|
|
|
func smokeKindCompletion() commandkit.CompletionHint {
|
|
kinds := aggregateSmokeKinds()
|
|
values := make([]string, 0, len(kinds)+1)
|
|
for _, kind := range kinds {
|
|
values = append(values, string(kind))
|
|
}
|
|
return completionChoices(append(values, "all")...)
|
|
}
|