jonmosco / kube-ps1

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

How to get it working with zsh & ohmyzsh and powerlevel10k set up #142

Closed ryan6416 closed 2 years ago

ryan6416 commented 2 years ago

Below is my .zshrc

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

export ZSH="/Users/ryanefendy/.oh-my-zsh"

ZSH_THEME="powerlevel10k/powerlevel10k"

plugins=(git zsh-autosuggestions zsh-completions history-substring-search z docker kubectl zsh-syntax-highlighting)

ZSH_DISABLE_COMPFIX=true
source $ZSH/oh-my-zsh.sh

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

# brew install kube-ps1
# source /opt/homebrew/Cellar/kube-ps1/0.7.0/share/kube-ps1.sh
# PROMPT='$(kube_ps1)'$PROMPT

source /Users/ryanefendy/Documents/kube-ps1/kube-ps1.sh
PROMPT='$(kube_ps1)'$PROMPT

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

and as for .p10k.zsh is pretty much the default.

Any idea or suggestion?

ryan6416 commented 2 years ago

Solved the issue. Have to configured powerlevel10k: https://github.com/romkatv/powerlevel10k/issues/1008