chore: rename cluster -> context option in commands for consistency

This commit is contained in:
Pasha Sviderski
2025-09-11 20:21:07 +10:00
parent 001acfc6a5
commit 8a273dbf63
6 changed files with 18 additions and 26 deletions
+1 -8
View File
@@ -12,8 +12,6 @@ import (
)
func NewListCommand() *cobra.Command {
var clusterContext string
cmd := &cobra.Command{
Use: "ls",
Aliases: []string{"list"},
@@ -24,11 +22,6 @@ func NewListCommand() *cobra.Command {
},
}
cmd.Flags().StringVarP(
&clusterContext, "context", "c", "",
"Name of the cluster context. (default is the current context)",
)
return cmd
}
@@ -51,7 +44,7 @@ func list(uncli *cli.CLI) error {
for _, name := range contextNames {
current := ""
if name == currentContext {
current = "*"
current = ""
}
connCount := len(uncli.Config.Contexts[name].Connections)
fmt.Fprintf(tw, "%s\t%s\t%d\n", name, current, connCount)