jonmosco / kube-ps1

Kubernetes prompt info for bash and zsh
Apache License 2.0
3.52k stars 351 forks source link

Automatically disable kube-ps1 when no context is available #179

Closed dashie closed 9 months ago

dashie commented 1 year ago

Is it possibile to automatically disable kube-ps1 when no context is set? So have a empty string instead of (<symbol>|N/A:N/A)

credativ-dar commented 1 year ago

Just in case you missed that: kubeoff -g turns it off by default so you can just kubeon if you need it, I guess that's easier for most people than unsetting the context.

jonmosco commented 9 months ago

Yes, that is the solution for this is using the kubeon and kubeoff functions: https://github.com/jonmosco/kube-ps1?tab=readme-ov-file#enablingdisabling