-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically disable kube-ps1 when no context is available #179
Comments
Just in case you missed that: |
Yes, that is the solution for this is using the |
kubeon and kubeoff only remove the kube-ps1 part from the PS1 string for the current shell. This is not exactly the requested feature here. What we want instead is to conditionally remove the kube-ps1 part from the PS1 if no context is set. This can be achieved easily by adding an extra check and return early if no context is set [[ "${KUBE_PS1_CONTEXT}" == "N/A" ]] && return at the start of the @jonmosco |
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)
The text was updated successfully, but these errors were encountered: