summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorGrigory Petrov <grigory.v.p@gmail.com>2015-08-26 14:30:13 +0300
committerGrigory Petrov <grigory.v.p@gmail.com>2015-08-26 14:30:13 +0300
commit0fe65ed830b5d1cdc5189230139b52f4c8aacfbc (patch)
treeea98b0ef90d2982f4fb44de448eafa3b2bb1c1ba /radar-base.sh
parenta93a5552ccb967cfc3b036e4adcecd78dc22ae0f (diff)
downloadgit-sonar-0fe65ed830b5d1cdc5189230139b52f4c8aacfbc.tar.gz
git-sonar-0fe65ed830b5d1cdc5189230139b52f4c8aacfbc.zip
bash prompt length fix: zero-length chars must be placed between \[ and \]
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 787d7a5..63b2b98 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -305,11 +305,11 @@ bash_color_changes_status() {
local changes=""
if [[ -n "$porcelain" ]]; then
- local green_staged_prefix="\033[1;32m"
- local red_unstaged_prefix="\033[1;31m"
- local yellow_conflicted_prefix="\033[1;33m"
- local grey_untracked_prefix="\033[1;37m"
- local reset_suffix="\033[0m"
+ local green_staged_prefix="\[\033[1;32m\]"
+ local red_unstaged_prefix="\[\033[1;31m\]"
+ local yellow_conflicted_prefix="\[\033[1;33m\]"
+ local grey_untracked_prefix="\[\033[1;37m\]"
+ local reset_suffix="\[\033[0m\]"
local staged_changes="$(staged_status "$porcelain" "$green_staged_prefix" "$reset_suffix")"
local unstaged_changes="$(unstaged_status "$porcelain" "$red_unstaged_prefix" "$reset_suffix")"
@@ -377,9 +377,9 @@ zsh_color_changes_status() {
bash_color_local_commits() {
local separator="${1:- }"
- local green_ahead_arrow="\033[1;32m↑\033[0m"
- local red_behind_arrow="\033[1;31m↓\033[0m"
- local yellow_diverged_arrow="\033[1;33m⇵\033[0m"
+ local green_ahead_arrow="\[\033[1;32m\]↑\[\033[0m\]"
+ local red_behind_arrow="\[\033[1;31m\]↓\[\033[0m\]"
+ local yellow_diverged_arrow="\[\033[1;33m\]⇵\[\033[0m\]"
local local_commits=""
if remote_branch="$(remote_branch_name)"; then
@@ -422,10 +422,10 @@ zsh_color_local_commits() {
bash_color_remote_commits() {
local remote_master="\xF0\x9D\x98\xAE" # an italic m to represent master
- local green_ahead_arrow="\033[1;32m←\033[0m"
- local red_behind_arrow="\033[1;31m→\033[0m"
- local yellow_diverged_arrow="\033[1;33m⇄\033[0m"
- local not_upstream="\033[1;31m⚡\033[0m"
+ local green_ahead_arrow="\[\033[1;32m\]←\[\033[0m\]"
+ local red_behind_arrow="\[\033[1;31m\]→\[\033[0m\]"
+ local yellow_diverged_arrow="\[\033[1;33m\]⇄\[\033[0m\]"
+ local not_upstream="\[\033[1;31m\]⚡\[\033[0m\]"
if remote_branch="$(remote_branch_name)"; then
remote_ahead="$(remote_ahead_of_master "$remote_branch")"