.bash_prompt: Improve escape sequences

Closes #598. See https://github.com/mathiasbynens/dotfiles/pull/598#issuecomment-157090316.
This commit is contained in:
Bogdan Cismariu
2015-11-17 01:11:07 +04:00
committed by Mathias Bynens
parent d6d083aa99
commit 7d43ff6f8f
+2 -2
View File
@@ -53,7 +53,7 @@ prompt_git() {
[ -n "${s}" ] && s=" [${s}]";
echo -e "${1}${branchName}${blue}${s}";
echo -e "${1}${branchName}${2}${s}";
else
return;
fi;
@@ -111,7 +111,7 @@ PS1+="\[${white}\] at ";
PS1+="\[${hostStyle}\]\h"; # host
PS1+="\[${white}\] in ";
PS1+="\[${green}\]\w"; # working directory
PS1+="\$(prompt_git \"${white} on ${violet}\")"; # Git repository details
PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details
PS1+="\n";
PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color)
export PS1;