diff --git a/zsh/zshrc b/zsh/zshrc index ce4f26b..8ef7d32 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -96,9 +96,9 @@ build_prompt() { PROMPT+=$prompt_ext_text # build prompt suffix - local prompt_nocolor=$(echo $PROMPT | perl -pe "s/%\{[^}]+\}//g") - local prompt_length=${#prompt_nocolor} - if [[ $prompt_length -gt 40 ]]; then + local prompt_nocolor=$(echo ${PROMPT} | perl -pe "s/%\{[^}]+\}//g") + local prompt_length=${#${(%)prompt_nocolor}} + if [[ $prompt_length -gt 45 ]]; then PROMPT+=$(prompt_segment cyan '\n%{\r%}⇒ ') else PROMPT+=$(prompt_segment cyan ' ⇒ ')