Skip to content

Commit a6909f9

Browse files
committed
chore(cmd): prettify lk app list-templates output
1 parent ed63ad9 commit a6909f9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cmd/lk/app.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,15 @@ func listTemplates(ctx context.Context, cmd *cli.Command) error {
191191
if cmd.Bool("json") {
192192
PrintJSON(templates)
193193
} else {
194-
const maxDescLength = 40
195-
table := CreateTable().Headers("Template", "Description", "Tags")
194+
const maxDescLength = 64
195+
table := CreateTable().Headers("Template", "Description").BorderRow(true)
196196
for _, t := range templates {
197+
desc := strings.Join(wrapToLines(t.Desc, maxDescLength), "\n")
198+
url := theme.Focused.Title.Render(t.URL)
199+
tags := theme.Help.ShortDesc.Render("#" + strings.Join(t.Tags, " #"))
197200
table.Row(
198201
t.Name,
199-
strings.Join(wrapToLines(t.Desc, maxDescLength), "\n"),
200-
strings.Join(t.Tags, ", "),
202+
desc+"\n\n"+url+"\n"+tags,
201203
)
202204
}
203205
fmt.Println(table)

0 commit comments

Comments
 (0)