Conversation
This prevents error messages which are used in `(skipped:...)` lines to be incorrectly rendered, as the `color` module resets all formatting after printing. This led the end of the `(skipped:...)` line to show in plain instead of dimmed colors. Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
|
As mentioned in #3058 we'll want to move the flag to the Defaults section. |
shared/cliconfig/default.go
Outdated
|
|
||
| // ShowColors controls whether colors are shown in the client. | ||
| ShowColors string `yaml:"show_colors"` |
There was a problem hiding this comment.
The way it's worded, I'd expect it to be a boolean, but that would then default to False which isn't really what we want here :)
Alternatives could be Colors which would be a string value that can be used to change the color scheme or turn them off entirely. Or NoColors which would then be a boolean in line with the behavior of NO_COLORS in the environment.
There was a problem hiding this comment.
I’m not particularly in the mood to implement a color scheme manager :)
Regarding the fact that it’s a not a boolean, that was exactly the line of reasoning behind it. Additionally, YAML booleans do not conform 1:1 to what Incus parses as booleans (0 and 1 don’t seem to get a special downcasting), but we can disregard that.
So, NoColors bool `yaml:"no_colors"` then?
There was a problem hiding this comment.
Well, the env var is NO_COLOR and the related movement is https://no-color.org, so let’s go singular.
Signed-off-by: Benjamin Somers <[email protected]>
Related-to: #3058