GithubHelp home page GithubHelp logo

TERM=vt100 causing empty output about kubectx HOT 5 CLOSED

ahmetb avatar ahmetb commented on May 15, 2024 1
TERM=vt100 causing empty output

from kubectx.

Comments (5)

cdenneen avatar cdenneen commented on May 15, 2024

#53 was supposed to add NO_COLOR but upgrading from 0.4.0 -> 0.5.0 with homebrew just resulted in EMPTY responses when TERM=vt100

~ » export TERM=vt100
~ » kubectx
~ » kubens
~ » export TERM=xterm
~ » kubectx
aws
docker-for-desktop
k8s
~ » kubens
default
jenkins
kube-public
kube-system

from kubectx.

ahmetb avatar ahmetb commented on May 15, 2024

For non-color terminals add * to current context?

we discussed this previously and it's not a great idea. we want commands like kubectx -d $(kubectx) to work. if you want to see the current-context in your PS1 string, try out kube-ps1.

Add option to only print current context

again we discussed this many times in #14, #28, #51. you can either use https://github.com/jonmosco/kube-ps1 or kubectl config current-context. No need a kubectx feature for this.

from kubectx.

ahmetb avatar ahmetb commented on May 15, 2024

Sorry, I'll reopen this to keep track of NO_COLOR empty output issue.

from kubectx.

ahmetb avatar ahmetb commented on May 15, 2024

(This is regarding your report about empty output when TERM=vt100.)

It looks like the tput command we're calling to set the colors is failing when TERM=vt100. I asked about it here:

https://unix.stackexchange.com/questions/464028/why-is-tput-failing-silently-on-term-vt100 would be interesting to learn why.

In the meanwhile, instead of doing

yellow=$(tput setaf 3)

we can do:

yellow=$(tput setaf 3 || true)

to ignore errors, but I don't think this is a good idea, since VT-100 has color support.

from kubectx.

ahmetb avatar ahmetb commented on May 15, 2024

I just fixed this by ignoring tput failure. vt100 does not have colors, so this will just print black and white output.

I'm not convinced people still use vt100 :)

from kubectx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.