Closed eogden93 closed 9 months ago
Same here.
# ~/.zshrc
source kube_ps1.sh
echo $(kube_ps1)
When I launched a new terminal, the echo message is empty. But If I source ~/.zshrc
again, it shows the prompt text.
I guess kube-ps1
didn't update PS1 through precmd
.
by the way, https://github.com/jonmosco/kube-ps1/issues/168#issuecomment-1377737774 this trick works well. Put PROMPT='$(kube_ps1)'$PROMPT
on last line in ~/.zshrc`.
by the way, #168 (comment) this trick works well. Put
PROMPT='$(kube_ps1)'$PROMPT
on last line in ~/.zshrc`.
This doesn't seem to be working using bash (not zsh) I get the output but its still not decoding the colors
Aha. I'm using zsh.
Closing this issue. If problem persists, please check out the README
I have a function in my .bash_profile
When I run this function it returns
[root@0232a48ae63e home ]$
This is missing the colored output fromkube_ps1
I've done some debugging and when I run
$(kube_ps1)
within the function it will return blank. However, runningkube_ps1
manually returns(\033[38;5;4m⎈|\033[38;5;1mrancher-desktop:\033[38;5;6mN/A)
My setup is a 3.15 Alpine docker image running on M1 Mac using bash (not zsh)