Skip to content

Commit 5949f91

Browse files
committed
chore(cmd): show default project with '*'
1 parent 961ba48 commit 5949f91

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/lk/project.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,15 @@ func listProjects(ctx context.Context, cmd *cli.Command) error {
262262
return baseStyle
263263
}
264264
}).
265-
Headers("Name", "URL", "API Key", "Default")
265+
Headers("Name", "URL", "API Key")
266266
for _, p := range cliConfig.Projects {
267-
table.Row(p.Name, p.URL, p.APIKey, fmt.Sprint(p.Name == cliConfig.DefaultProject))
267+
var pName string
268+
if p.Name == cliConfig.DefaultProject {
269+
pName = "* " + p.Name
270+
} else {
271+
pName = " " + p.Name
272+
}
273+
table.Row(pName, p.URL, p.APIKey)
268274
}
269275
fmt.Println(table)
270276
}

0 commit comments

Comments
 (0)