Skip to content

Commit 7d43ff6

Browse files
bcismariumathiasbynens
authored andcommitted
.bash_prompt: Improve escape sequences
Closes mathiasbynens#598. See mathiasbynens#598 (comment).
1 parent d6d083a commit 7d43ff6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.bash_prompt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ prompt_git() {
5353

5454
[ -n "${s}" ] && s=" [${s}]";
5555

56-
echo -e "${1}${branchName}${blue}${s}";
56+
echo -e "${1}${branchName}${2}${s}";
5757
else
5858
return;
5959
fi;
@@ -111,7 +111,7 @@ PS1+="\[${white}\] at ";
111111
PS1+="\[${hostStyle}\]\h"; # host
112112
PS1+="\[${white}\] in ";
113113
PS1+="\[${green}\]\w"; # working directory
114-
PS1+="\$(prompt_git \"${white} on ${violet}\")"; # Git repository details
114+
PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details
115115
PS1+="\n";
116116
PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color)
117117
export PS1;

0 commit comments

Comments
 (0)