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