Skip to content

Commit 8fceb6e

Browse files
committed
bashrc_vcs_*: apply correct RL_S,E, Fix #11
1 parent 4b822a6 commit 8fceb6e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bashrc.d/.vcs_git

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ alias __git_branch="git branch 2>/dev/null | grep '*' | sed 's/*\ //g'"
3333
_git_status() {
3434
git branch &>/dev/null || return 1
3535
if LC_ALL=C git status | grep -q "nothing to commit"; then
36-
echo -e "\[\e[1m\]@\[\e[0;32m\]$(__git_branch)\[\e[0m\]"
36+
echo -e "\01\e[1m\02@\01\e[0;32m\02$(__git_branch)\01\e[0m\02"
3737
elif LC_ALL=C git status | grep -q "nothing added to commit"; then # Untracked
38-
echo -e "\[\e[1m\]@\[\e[0;35m\]$(__git_branch)\[\e[0m\]"
38+
echo -e "\01\e[1m\02@\01\e[0;35m\02$(__git_branch)\01\e[0m\02"
3939
else # Change not added/not merged yet
40-
echo -e "\[\e[1m\]@\[$IRED\]$(__git_branch)\[\e[0m\]"
40+
echo -e "\01\e[1m\02@\01$IRED\02$(__git_branch)\01\e[0m\02"
4141
fi
4242
}
4343

bashrc.d/.vcs_hg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ alias ha='hg add .'
1818
_hg_status() {
1919
hg branch &>/dev/null || return 1
2020
if LC_ALL=C hg status | grep -q ' '; then
21-
echo -ne "@\[\e[1m\]\[\e[0;32m\]$(hg branch)\[\e[0m\]"
21+
echo -ne "@\01\e[1m\]\01\e[0;32m\]$(hg branch)\01\e[0m\]"
2222
else
23-
echo -ne "@\[\e[1m\]\[$IRED\]$(hg branch)\[\e[0m\]"
23+
echo -ne "@\01\e[1m\]\01$IRED\]$(hg branch)\01\e[0m\]"
2424
fi
2525
}
2626

0 commit comments

Comments
 (0)