diff --git a/.changelog/60.txt b/.changelog/60.txt new file mode 100644 index 00000000..8711989a --- /dev/null +++ b/.changelog/60.txt @@ -0,0 +1,3 @@ +```release-note:improvement +waypoint: change template list format to use a table +``` diff --git a/internal/commands/waypoint/templates/list.go b/internal/commands/waypoint/templates/list.go index dfaefbec..3ec28ea5 100644 --- a/internal/commands/waypoint/templates/list.go +++ b/internal/commands/waypoint/templates/list.go @@ -76,5 +76,11 @@ func listTemplates(opts *TemplateOpts) error { templates = append(templates, resp.GetPayload().ApplicationTemplates...) } - return opts.Output.Show(templates, format.Pretty) + templateFields := []format.Field{ + format.NewField("Name", "{{ .Name }}"), + format.NewField("ID", "{{ .ID }}"), + format.NewField("Summary", "{{ .Summary }}"), + } + + return opts.Output.Display(format.NewDisplayer(templates, format.Table, templateFields)) }