hidetatz / kubecolor

colorizes kubectl output
MIT License
1.43k stars 109 forks source link

diff coloring #77

Closed oguzyildizz closed 1 year ago

oguzyildizz commented 3 years ago

I think it it would be nice to have diff colors similar to helm diff, currently the entire output looks green

Wikiwix commented 2 years ago

Depending on the did tool you have configured, adding the option --plain helps. Though I believe for the did command kubecolor should never overwrite the colour, so the issue stays valid

hidetatz commented 1 year ago

Let's discuss this in https://github.com/hidetatz/kubecolor/issues/117

Wikiwix commented 1 year ago

@hidetatz In my opinion this is not connected to an overall colour schema.

kubectl diff always displays the output of an external tool which means that kubecolor should never interfere with the colorization that tool may or may not do.

FYI the relevant excerpt of of kubectl diff --help:

Diff configurations specified by file name or stdin between the current online configuration, and the configuration as it would be if applied.

 The output is always YAML.

 KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. Users can use external commands with params too, example: KUBECTL_EXTERNAL_DIFF="colordiff -N -u"

 By default, the "diff" command available in your path will be run with the "-u" (unified diff) and "-N" (treat absent files as empty) options.