enhanced default cluster selection, add 'cluster switch', overhaul json header setting (#47)

This commit is contained in:
T. von Dein
2026-06-24 09:25:50 +02:00
parent 3c6819151f
commit ffcb8adb70
26 changed files with 393 additions and 320 deletions

View File

@@ -122,7 +122,10 @@ func Main() int {
Before: func(ctx context.Context, cmd *cli.Command) (context.Context, error) {
if tree {
Tree(cmd)
if err := Tree(cmd); err != nil {
return nil, err
}
os.Exit(0)
}
@@ -254,7 +257,7 @@ func Debug(conf *cfg.Config) *cli.Command {
func Tree(cmd *cli.Command) error {
max := 20
cmd.Walk(func(cmd *cli.Command) error {
return cmd.Walk(func(cmd *cli.Command) error {
path := cmd.Path()
command := path[len(path)-1]
@@ -269,6 +272,4 @@ func Tree(cmd *cli.Command) error {
return nil
})
return nil
}