diff --git a/action/config/load.go b/action/config/load.go index 393daa21..b5b60fbd 100644 --- a/action/config/load.go +++ b/action/config/load.go @@ -226,7 +226,7 @@ func (c *Config) Load(ctx *cli.Context) error { // and if it is set in the context if strings.Contains(f, internal.FlagColorTheme) && !ctx.IsSet(internal.FlagColorTheme) && - len(config.ColorFormat) > 0 { + len(config.ColorTheme) > 0 { // set the color theme field to value from config err = ctx.Set(internal.FlagColorTheme, config.ColorTheme) if err != nil { diff --git a/cmd/vela-cli/main.go b/cmd/vela-cli/main.go index 7c0c5a78..a0026b8e 100644 --- a/cmd/vela-cli/main.go +++ b/cmd/vela-cli/main.go @@ -142,13 +142,13 @@ func main() { &cli.StringFlag{ EnvVars: []string{"VELA_COLOR_FORMAT"}, Name: internal.FlagColorFormat, - Usage: "enable or disable color output", + Usage: "overrides the output color format (default: terminal256)", }, &cli.StringFlag{ EnvVars: []string{"VELA_COLOR_THEME"}, Name: internal.FlagColorTheme, - Usage: "configures the output color theme", + Usage: "configures the output color theme (default: monokai)", }, } diff --git a/command/settings/view.go b/command/settings/view.go index 96a3d7e1..384f16d6 100644 --- a/command/settings/view.go +++ b/command/settings/view.go @@ -11,6 +11,7 @@ import ( "github.com/go-vela/cli/action/settings" "github.com/go-vela/cli/internal" "github.com/go-vela/cli/internal/client" + "github.com/go-vela/cli/internal/output" ) // CommandView defines the command for inspecting the platform settings record. @@ -62,6 +63,7 @@ func view(c *cli.Context) error { s := &settings.Config{ Action: internal.ActionView, Output: c.String(internal.FlagOutput), + Color: output.ColorOptionsFromCLIContext(c), } // validate settings configuration