1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 12:30:32 +01:00

SHLVL integration

This commit is contained in:
2024-05-14 13:50:44 +02:00
parent 5dbac71442
commit 00f39b4fad

View File

@@ -53,6 +53,7 @@ function prompt_ps1() {
host="%S%B$host" host="%S%B$host"
fi fi
local shlvl="%{$fg[black]%}%{$bg[magenta]%}\${(l:$SHLVL-1::>:)}%{$reset_color%}"
local prompt="%n@%{$fg[cyan]%}%m$rs %# " local prompt="%n@%{$fg[cyan]%}%m$rs %# "
ps1=( ps1=(
"$host" "$host"
@@ -61,6 +62,7 @@ function prompt_ps1() {
$'\n' $'\n'
'$(prompt_handle_virtualenv)' '$(prompt_handle_virtualenv)'
'${vcs_info_msg_0_:+${vcs_info_msg_0_}\n}' '${vcs_info_msg_0_:+${vcs_info_msg_0_}\n}'
"$shlvl"
"$prompt" "$prompt"
) )
echo "${(j::)ps1}" echo "${(j::)ps1}"