style (zshrc): only display the latest name of the folder

This commit is contained in:
eeemsi 2025-05-05 13:59:01 +02:00
parent 42b4bfc7ab
commit d1f3baacce

4
zshrc
View File

@ -96,9 +96,9 @@ precmd() {
# check if vcs_info_msg_0_ is empty to avoid an anoying space in the prompt
if [[ -z ${vcs_info_msg_0_} ]]; then
PS1='%B%K{white}%F{black}%(3~|…/%2~|%~)%k%f %%%b '
PS1='%B%K{white}%F{black}%(3~|…/%1~|%~)%k%f %%%b '
else
PS1='%B%K{white}%F{black}%(3~|…/%2~|%~)%k%f %F{green}${vcs_info_msg_0_}%f %%%b '
PS1='%B%K{white}%F{black}%(3~|…/%1~|%~)%k%f %F{green}${vcs_info_msg_0_}%f %%%b '
fi
}