Skip to content

Commit

Permalink
fix zsh prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi Iiguni <[email protected]>
  • Loading branch information
guni1192 committed Jan 10, 2025
1 parent bcf7632 commit 3341fd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions zsh/prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green} %b%k"
zstyle ':vcs_info:*' actionformats '%b|%a'

username="%F{blue}%K{black}%n@%m%b%k"
directory="%F{cyan}%K{black} %~%b%k"
return_code="%F{white}%K{black} %? %b%k"
auth="%F{white}%K{black}%# %b%k"
username="%F{blue}%n@%m%b%k"
directory="%F{cyan} %~%b%k"
return_code="%F{white} %? %b%k"
auth="%F{white}%# %b%k"

precmd () {
vcs_info
export kube_current_context=""
context=$(kubectl config current-context)
if [[ "$context" =~ .*"prd".* ]] || [[ "$context" =~ .*"production".* ]]; then
export kube_current_context="%F{red}%K{black} $context %b%k"
export kube_current_context="%F{red} $context %b%k"
else
export kube_current_context="%F{yellow}%K{black} $context %b%k"
export kube_current_context="%F{yellow} $context %b%k"
fi
}

Expand Down

0 comments on commit 3341fd4

Please sign in to comment.