mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat(cli): add shell completions (#14341)
This commit is contained in:
@ -65,8 +65,8 @@ func (f *OutputFormatter) AttachOptions(opts *serpent.OptionSet) {
|
||||
Flag: "output",
|
||||
FlagShorthand: "o",
|
||||
Default: f.formats[0].ID(),
|
||||
Value: serpent.StringOf(&f.formatID),
|
||||
Description: "Output format. Available formats: " + strings.Join(formatNames, ", ") + ".",
|
||||
Value: serpent.EnumOf(&f.formatID, formatNames...),
|
||||
Description: "Output format.",
|
||||
},
|
||||
)
|
||||
}
|
||||
@ -136,8 +136,8 @@ func (f *tableFormat) AttachOptions(opts *serpent.OptionSet) {
|
||||
Flag: "column",
|
||||
FlagShorthand: "c",
|
||||
Default: strings.Join(f.defaultColumns, ","),
|
||||
Value: serpent.StringArrayOf(&f.columns),
|
||||
Description: "Columns to display in table output. Available columns: " + strings.Join(f.allColumns, ", ") + ".",
|
||||
Value: serpent.EnumArrayOf(&f.columns, f.allColumns...),
|
||||
Description: "Columns to display in table output.",
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user