Only evaluate prompt_gitster_status once
replacing its contents directly into the `PROMPT`, instead of calling the function continuously.
This commit is contained in:
parent
4b95df9a5f
commit
fbe108f5f3
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
# Requires the `git-info` zmodule to be included in the .zimrc file.
|
||||
|
||||
prompt_gitster_status() {
|
||||
print -n '%(?:%F{green}➜:%F{red}➜) '
|
||||
print -n '%(?:%F{green}:%F{red})➜ '
|
||||
}
|
||||
|
||||
prompt_gitster_pwd() {
|
||||
|
@ -37,7 +37,7 @@ prompt_gitster_setup() {
|
|||
zstyle ':zim:git-info:keys' format \
|
||||
'prompt' ' %F{cyan}%b%c %C%D'
|
||||
|
||||
PROMPT='$(prompt_gitster_status)$(prompt_gitster_pwd)$(prompt_gitster_git)%f '
|
||||
PROMPT="$(prompt_gitster_status)\$(prompt_gitster_pwd)\$(prompt_gitster_git)%f "
|
||||
RPROMPT=''
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue