fix (zshrc): add prompt setup to array of precmd_functions
This commit is contained in:
parent
3734e7f232
commit
7fc93e8351
3
zshrc
3
zshrc
@ -91,7 +91,7 @@ alias less='less --line-numbers'
|
|||||||
alias cdt='builtin cd "$(mktemp -d)"'
|
alias cdt='builtin cd "$(mktemp -d)"'
|
||||||
|
|
||||||
# Defines the prompt
|
# Defines the prompt
|
||||||
precmd() {
|
precmd_define_prompt() {
|
||||||
vcs_info
|
vcs_info
|
||||||
|
|
||||||
# check if vcs_info_msg_0_ is empty to avoid an anoying space in the prompt
|
# check if vcs_info_msg_0_ is empty to avoid an anoying space in the prompt
|
||||||
@ -101,6 +101,7 @@ precmd() {
|
|||||||
PS1='%B%K{white}%F{black}%(3~|…/%1~|%~)%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
|
fi
|
||||||
}
|
}
|
||||||
|
precmd_functions+=precmd_define_prompt
|
||||||
|
|
||||||
# include reading files from directory
|
# include reading files from directory
|
||||||
source "${HOME}"/.zsh/*
|
source "${HOME}"/.zsh/*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user