Add \e[K to PS1 (zsh).
This commit is contained in:
4
.zshrc
4
.zshrc
@@ -42,9 +42,9 @@ zstyle ':vcs_info:git*' formats "%b"
|
||||
precmd() {
|
||||
vcs_info
|
||||
if [[ -z "$WINDOW" ]]; then
|
||||
PS1=$'%{\e[G\e[m\e[32m%}%n%{\e[m%}@%{\e[36m%}%m%{\e[m%} [%{\e[32m%}%~%{\e[m%}] [%{\e[36m%}%D{%R}%{\e[m%}] '
|
||||
PS1=$'%{\e[m\e[G\e[K\e[32m%}%n%{\e[m%}@%{\e[36m%}%m%{\e[m%} [%{\e[32m%}%~%{\e[m%}] [%{\e[36m%}%D{%R}%{\e[m%}] '
|
||||
else
|
||||
PS1=$'%{\e[G\e[m\e[32m%}%n%{\e[m%}@%{\e[36m%}%m%{\e[m%} [%{\e[32m%}%~%{\e[m%}] [%{\e[36m%}%D{%R}%{\e[m%}/%{\e[36m%}W${WINDOW}%{\e[m%}]%{\e[0m%} '
|
||||
PS1=$'%{\e[m\e[G\e[K\e[32m%}%n%{\e[m%}@%{\e[36m%}%m%{\e[m%} [%{\e[32m%}%~%{\e[m%}] [%{\e[36m%}%D{%R}%{\e[m%}/%{\e[36m%}W${WINDOW}%{\e[m%}]%{\e[0m%} '
|
||||
fi
|
||||
if [[ ! -z "$vcs_info_msg_0_" ]]; then
|
||||
PS1+=$'%{\e[1;30m%}(${vcs_info_msg_0_})%{\e[m%} '
|
||||
|
||||
Reference in New Issue
Block a user