mirror of
https://github.com/wahyd4/dotfiles.git
synced 2026-08-09 04:46:12 +10:00
.bash_prompt: Improve escape sequences
Closes #598. See https://github.com/mathiasbynens/dotfiles/pull/598#issuecomment-157090316.
This commit is contained in:
committed by
Mathias Bynens
parent
d6d083aa99
commit
7d43ff6f8f
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user