bdcb4d9d1f36d5d82720dfd53f0c95242ab62dae

Author
SgtDaJim <junyuan-zhang@hotmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(bira): add support for `kube-ps1` prompt (#8437)

Diff

 1diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme
 2index 42a70a018953144c66aa5762801fd6ee403f3187..f909afa62b8df03fcbded5384204035ea127967b 100644
 3--- a/themes/bira.zsh-theme
 4+++ b/themes/bira.zsh-theme
 5@@ -6,10 +6,15 @@ local current_dir="%B%{$fg[blue]%}%~ %{$reset_color%}"
 6 local vcs_branch='$(git_prompt_info)$(hg_prompt_info)'
 7 local rvm_ruby='$(ruby_prompt_info)'
 8 local venv_prompt='$(virtualenv_prompt_info)'
 9+if [[ "${plugins[@]}" =~ 'kube-ps1' ]]; then
10+    local kube_prompt='$(kube_ps1)'
11+else
12+    local kube_prompt=''
13+fi
14 
15 ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
16 
17-PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}
18+PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt}
19 ╰─%B${user_symbol}%b "
20 RPROMPT="%B${return_code}%b"
21