kubeon/kubeoff does not change prompt when added as oh-my-zsh plugin
Chr1stian opened this issue · comments
kubeon
/kubeoff
does not change prompt when added as oh-my-zsh plugin. Aka nothing happens.
Running PROMPT='$(kube_ps1)'$PROMPT
changes the prompt, but only temporarily. Adding it to .zshrc does nothing
Same issue here. Ubuntu 20.04
Let me know if I should provide more information. Running Mac OS Ventura 13.1
This is an issue with the oh-my-zsh plugin. The plugin and this project are not always in sync. I will update the plugin with the newest version as soon as I get a chance.
Do you recommend installing kube-ps1 another way than with the plugin then? I have come to rely heavily upon this awesome promt changer 🥇
adding
PROMPT='$(kube_ps1)'$PROMPT
at the end of .zshrc
works for me
I don't know if it just has to be set after some specific line (probably relating to oh-my-zsh) like for example:
eval "$(starship init zsh)"
But anyways, putting
PROMPT='$(kube_ps1)'$PROMPT
At the last line of .zshrc
worked for me as well now. Thanks matteo!
I have the same problem atm (MacOS) and putting PROMPT='$(kube_ps1)'$PROMPT
at the end doesn't do anything 😕
I have the same problem atm (MacOS) and putting PROMPT='$(kube_ps1)'$PROMPT at the end doesn't do anything 😕
Did you try to run kubeon -g
command? @samurang87
I'm not sure what your configuration looks like, but testing the prompt with the latest version of oh-my-zsh works for me on MacOS, and on MacOS in a containerized environment. The readme suggests to try your configuration with a minimal config to help debug: https://github.com/jonmosco/kube-ps1#bug-reports-and-shell-configuration
There are other factors to consider as well: do you have your kubeconfig file, kubectl installed, prompt initialization configured correctly, etc?
oh-my-zsh can be complicated to debug, although, if you try to use a default/base configuration, the process might be simpler.
My suggestion is to try a container with the latest oh-my-zsh image, and copy your kubectl config file in the container, and do the basic configuration as outlined in the README.
Please reopen if this issue persists.