From d5dbddf68c45dfff380d6e6767de401054024a19 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Wed, 19 Aug 2015 09:49:20 +0100 Subject: Remove unnecessary subshells from bash prompt In the zsh prompt we need to use '%s' on the printf to prevent the `${fg_bold[]}` expressions from expanding before the colors have been loaded in. In the bash prompt this is unnecessary as the \\033 codes are base control characters, and so have no dependency they rely on. --- git-base.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git-base.sh') diff --git a/git-base.sh b/git-base.sh index 239e2bd..0fee704 100755 --- a/git-base.sh +++ b/git-base.sh @@ -333,7 +333,7 @@ bash_color_changes_status() { changes="$staged_changes$conflicted_changes$unstaged_changes$untracked_changes" fi - printf %s "$changes" + printf "$changes" } zsh_color_changes_status() { @@ -394,7 +394,7 @@ bash_color_local_commits() { local_commits="$separator$local_ahead$green_ahead_arrow" fi fi - printf %s "$local_commits" + printf "$local_commits" } zsh_color_local_commits() { @@ -442,7 +442,7 @@ bash_color_remote_commits() { remote="upstream $not_upstream " fi - printf %s "$remote" + printf "$remote" } zsh_color_remote_commits() { -- cgit v1.2.3