kwctl icon indicating copy to clipboard operation
kwctl copied to clipboard

Feature Request: allow disable colorful output

Open jvanz opened this issue 2 years ago • 4 comments

Is your feature request related to a problem?

Sometimes, when we want to share the command output (e.g. documentation) the colors chars gets in the way of coping the output to somewhere else.

Solution you'd like

I would like to have a flag which disable the colorful output. Something like: --no-color

Alternatives you've considered

It's possible to remove the color chars using sed:

kwctl inspect registry://ghcr.io/kubewarden/policies/user-group-psp:v0.2.0 | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" 

Anything else?

No response

jvanz avatar Apr 08 '22 13:04 jvanz

I think this is a problem with your terminal. Here I can copy and paste without any issue from Gnome Terminal into something basic like a text file either via the shell or into Gedit...

I would close this issue

flavio avatar Apr 12 '22 07:04 flavio

I don't need it for copying manually either, but a --no-color could be useful if we pipe output of commands to files directly, to automate generating the expected outputs on CI.

viccuad avatar Apr 13 '22 07:04 viccuad

I would like to support either --no-color or setting NO_COLOR.

viccuad avatar Apr 20 '22 09:04 viccuad

Fine with me

flavio avatar Apr 20 '22 15:04 flavio

I would like to work on this issue. Can you please assign it to me?

adnanhashmi09 avatar May 14 '23 08:05 adnanhashmi09

@adnanhashmi09 welcome! Assigned this to you :)

viccuad avatar May 15 '23 11:05 viccuad