From 3f5b4961254523ce8f08b5aff5b78966f3449cc7 Mon Sep 17 00:00:00 2001 From: Bram Schoenmakers Date: Sun, 23 Dec 2012 11:13:38 +0100 Subject: [PATCH] Call current_branch() only once by using the cached value. --- themes/eastwood.zsh-theme | 2 +- themes/gallois.zsh-theme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/eastwood.zsh-theme b/themes/eastwood.zsh-theme index db2529990..ce77a2f4f 100644 --- a/themes/eastwood.zsh-theme +++ b/themes/eastwood.zsh-theme @@ -16,7 +16,7 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" git_custom_status() { local cb=$(current_branch) if [ -n "$cb" ]; then - echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$cb$ZSH_THEME_GIT_PROMPT_SUFFIX" fi } diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index 3eac14867..46b35461f 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -7,7 +7,7 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" git_custom_status() { local cb=$(current_branch) if [ -n "$cb" ]; then - echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$cb$ZSH_THEME_GIT_PROMPT_SUFFIX" fi }