From 0fe65ed830b5d1cdc5189230139b52f4c8aacfbc Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 26 Aug 2015 14:30:13 +0300 Subject: bash prompt length fix: zero-length chars must be placed between \[ and \] --- prompt.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'prompt.bash') 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 -- cgit v1.2.3 From 637c573f7324538f27cd8a6869193e1364d75e76 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 26 Aug 2015 14:37:43 +0300 Subject: Revert "bash prompt length fix: zero-length chars must be placed between \[ and \]" This reverts commit 0fe65ed830b5d1cdc5189230139b52f4c8aacfbc. --- prompt.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'prompt.bash') diff --git a/prompt.bash b/prompt.bash index 4ceaf22..d577087 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;30m\]git:(\[\033[0m\]" + printf " \033[1;30mgit:(\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 -- cgit v1.2.3 From 2cec6490e26d476f354cb1ee2bbef73ab94e8823 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 26 Aug 2015 14:47:03 +0300 Subject: bash prompt length fix: zero-length chars must be placed between \[ and \], but only for PS1 string --- prompt.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'prompt.bash') 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 -- cgit v1.2.3