Skip to content

Commit

Permalink
Only show SHLVL if higher than 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed May 27, 2022
1 parent 6c1d48e commit f29befc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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]? "
Expand Down

0 comments on commit f29befc

Please sign in to comment.