From 76cf486d5dd21c68af8af6deaf9c1e111bffd316 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Fri, 10 Mar 2017 13:49:59 -0500 Subject: [PATCH] Only evaluate prompt_gitster_status once replacing its contents directly into the `PROMPT`, instead of calling the function continuously. Closes #150 --- modules/prompt/themes/gitster.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/prompt/themes/gitster.zsh-theme b/modules/prompt/themes/gitster.zsh-theme index 55c52c1..f98580f 100644 --- a/modules/prompt/themes/gitster.zsh-theme +++ b/modules/prompt/themes/gitster.zsh-theme @@ -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='' }