kubecolor / kubecolor

Colorize your kubectl output
https://kubecolor.github.io/
MIT License
823 stars 28 forks source link

kubecolor completion has color #195

Closed mike2194 closed 1 week ago

mike2194 commented 1 week ago

Expected behavior

prompt completion should not be colorized:

 ~ % kc annotate
Completing completions
annotate       -- Update the annotations on a resource
api-resources  -- Print the supported API resources on the server
api-versions   -- Print the supported API versions on the server, in the form of "group/version"
apply          -- Apply a configuration to a resource by file name or stdin

Current behavior

when completing a command, the completion includes raw color strings:

 ~ % kc $'\033'\[33mannotate

Package manager

Other (please specify in "Additional context" section)

What operating system are you running?

No response

Kubectl and kubecolor version

~ % /usr/bin/kubecolor version --client
Client Version: v1.29.8
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Package: kubecolor
Version: 0.0.20-2ubuntu0.24.04.2
Built-Using: golang-1.22 (= 1.22.2-2ubuntu0.3), golang-github-google-go-cmp (= 0.6.0-1), golang-github-makenowjust-heredoc (= 1.0.0-1), golang-github-mattn-go-colorable (= 0.1.13-1), golang-github-mattn-go-isatty (= 0.0.20-1), golang-golang-x-sys (= 0.17.0-1)

Additional context

installed with apt install kubecolor

mike2194 commented 1 week ago

resolved by installing modern version, do not use Ubuntu package manager to install kubecolor

created this issue only to describe solution, please close as duplicate of #170

applejag commented 1 week ago

If you (or anyone) knows how to get Ubuntu to update their package then I'm all ears.

I've tried following their docs on it before but I always give up before finishing it as it's weirdly tedious, and I don't have a contact person working on Debian or Ubuntu packaging