mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
added cloud status to ps1
This commit is contained in:
parent
0cec462621
commit
0d4e299fb3
1 changed files with 7 additions and 0 deletions
|
|
@ -84,6 +84,12 @@ prompt_context() {
|
|||
fi
|
||||
}
|
||||
|
||||
prompt_kubernetes() {
|
||||
|
||||
local cluster=$(kubectl config current-context | grep --colour=never -o '^[^.]*\.[^.]*')
|
||||
prompt_segment magenta black "☁️ ${cluster}☁️ "
|
||||
}
|
||||
|
||||
# Git: branch/detached head, dirty status
|
||||
prompt_git() {
|
||||
(( $+commands[git] )) || return
|
||||
|
|
@ -216,6 +222,7 @@ prompt_status() {
|
|||
build_prompt() {
|
||||
RETVAL=$?
|
||||
prompt_status
|
||||
prompt_kubernetes
|
||||
prompt_virtualenv
|
||||
prompt_context
|
||||
prompt_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue