summaryrefslogtreecommitdiffstats
path: root/prompt.bash
diff options
context:
space:
mode:
authorGrigory Petrov <grigory.v.p@gmail.com>2015-08-26 14:47:03 +0300
committerGrigory Petrov <grigory.v.p@gmail.com>2015-08-26 14:47:03 +0300
commit2cec6490e26d476f354cb1ee2bbef73ab94e8823 (patch)
tree259e7dc351febff31c33c35445ca0de0d4af3c1b /prompt.bash
parent637c573f7324538f27cd8a6869193e1364d75e76 (diff)
downloadgit-sonar-2cec6490e26d476f354cb1ee2bbef73ab94e8823.tar.gz
git-sonar-2cec6490e26d476f354cb1ee2bbef73ab94e8823.zip
bash prompt length fix: zero-length chars must be placed between \[ and \], but only for PS1 string
Diffstat (limited to 'prompt.bash')
-rwxr-xr-xprompt.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/prompt.bash b/prompt.bash
index d577087..4ceaf22 100755
--- a/prompt.bash
+++ b/prompt.bash
@@ -4,12 +4,12 @@ dot="$(cd "$(dirname "$0")"; pwd)"
source "$dot/radar-base.sh"
if is_repo; then
- printf " \033[1;30mgit:(\033[0m"
+ printf " \[\033[1;30m\]git:(\[\033[0m\]"
bash_color_remote_commits
- printf "\033[0;37m"
+ printf "\[\033[0;37m\]"
readable_branch_name
- printf "\033[0m"
+ printf "\[\033[0m\]"
bash_color_local_commits
- printf "\033[1;30m)\033[0m"
+ printf "\[\033[1;30m\])\[\033[0m\]"
bash_color_changes_status
fi