mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli): add shell completions (#14341)
This commit is contained in:
@@ -81,6 +81,8 @@ var usageTemplate = func() *template.Template {
|
||||
switch v := opt.Value.(type) {
|
||||
case *serpent.Enum:
|
||||
return strings.Join(v.Choices, "|")
|
||||
case *serpent.EnumArray:
|
||||
return fmt.Sprintf("[%s]", strings.Join(v.Choices, "|"))
|
||||
default:
|
||||
return v.Type()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user