diff options
author | Michael Allen <michael@michaelallen.io> | 2015-08-19 09:49:20 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-08-19 09:49:25 +0100 |
commit | d5dbddf68c45dfff380d6e6767de401054024a19 (patch) | |
tree | 3ee24532344bd8d70340010c10de4537f5e696eb /git-base.sh | |
parent | 5bfe5141cce192b17d1327809126048ec6dc622c (diff) | |
download | git-sonar-d5dbddf68c45dfff380d6e6767de401054024a19.tar.gz git-sonar-d5dbddf68c45dfff380d6e6767de401054024a19.zip |
Remove unnecessary subshells from bash prompt
In the zsh prompt we need to use '%s' on the printf to prevent the
`${fg_bold[<color>]}` 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.
Diffstat (limited to '')
-rwxr-xr-x | git-base.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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() { |