This commit is contained in:
2025-08-29 17:28:53 +02:00
parent 3431868903
commit f265cb5630
2 changed files with 49 additions and 1 deletions

View File

@@ -95,7 +95,7 @@ yq() {
}
kgy() {
if [[ $1 == "secret" ]]; then
if [[ $1 == "secret" ]] || [[ $1 == "secrets" ]]; then
kubectl get -o yaml "$@" | yq '.stringData = (.data | with_entries(.value |= @base64d))'
else
# we use yq instead of kubecolor to have the same color schema as above

View File

@@ -0,0 +1,48 @@
setopt promptsubst
# (){
# local left right invisible leftcontent
#
# # User name.
# left+='%B%F{black}%K{green} %n '
# # Current working directory.
# left+='%K{yellow} %~ '
#
# # Version control branch.
# right='${vcs_info_msg_0_:+${vcs_info_msg_0_//[%]/%%} }'
# # Virtualenv.
# export VIRTUAL_ENV_DISABLE_PROMP=1
# right+='${VIRTUAL_ENV:+venv }'
#
# # Editing mode. $ZLE_MODE shouldn't contain %, no need to escape
# ZLE_MODE=insert
# right+='%K{green} $ZLE_MODE'
#
# # closing
# right+=$' %k%f%b'
#
# # Combine left and right prompt with spacing in between.
# invisible='%([BSUbfksu]|([FBK]|){*})'
#
# leftcontent=${(S)left//$~invisible}
# rightcontent=${(S)right//$~invisible}
#
# PS1="$left\${(l,COLUMNS-\${#\${(%):-$leftcontent$rightcontent}},)}$right%{"$'\n%}$ '
# }
WORKDIR='%B%F{blue}%~%b%f'
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats '(%b)'
precmd() {
vcs_info
}
GIT='%F{green}$vcs_info_msg_0_%f'
PROMPT_SHLVL='%(?.%F{green}.%F{red})$(printf "%.0s" {1..$SHLVL})%f'
# %(?.%F{green}>.$F{red}>.)
export PROMPT="-----\n$WORKDIR $GIT $PROMPT_SHLVL "
export RPROMPT='%j'