From f29befcc84a14e919897836126956fbc62612d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 27 May 2022 20:50:36 +0200 Subject: [PATCH] Only show SHLVL if higher than 1 --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 643a172..81bce13 100644 --- a/zshrc +++ b/zshrc @@ -66,8 +66,8 @@ typeset -gA ZSH_HIGHLIGHT_STYLES ZSH_HIGHLIGHT_STYLES[comment]="fg=cyan" # add shell level information to prompt for when dealing with nested zsh sessions -RPROMPT+="${RPROMPT+ }{%F{yellow}$SHLVL%f}" -ZLE_RPROMPT_INDENT=0 +RPROMPT+="${RPROMPT+ }%(2L.{%F{yellow}%L%f}.)" +ZLE_RPROMPT_INDENT=$(( SHLVL > 1 ? 0 : ZLE_RPROMPT_INDENT )) # add color to correct prompt SPROMPT="Correct '%F{red}%R%f' to '%F{green}%r%f' [nyae]? "