Skip to content

Commit a064f96

Browse files
committed
feat: add compact target listing mode when verbose flag is disabled
1 parent e930f8a commit a064f96

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/cmd/cli/command/commands.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,18 @@ var tenantsCmd = &cobra.Command{
462462
if selected {
463463
marker = "*" // highlight selected
464464
}
465-
line := fmt.Sprintf("%s %-*s (%s)\n", marker, maxNameLen, t.Name, t.ID)
465+
466+
var line string
467+
if verbose {
468+
line = fmt.Sprintf("%s %-*s (%s)\n", marker, maxNameLen, t.Name, t.ID)
469+
} else {
470+
line = fmt.Sprintf("%s %s\n", marker, t.Name)
471+
}
472+
466473
if selected {
467-
term.Printc(term.BrightCyan, " * ", line)
474+
term.Printc(term.BrightCyan, line)
468475
} else {
469-
term.Printc(term.InfoColor, " * ", line)
476+
term.Printc(term.InfoColor, line)
470477
}
471478
}
472479
return nil

0 commit comments

Comments
 (0)