Skip to content

Commit d726732

Browse files
committed
bashrc: additional fixes for #8.
Performed tests on Mintty (Cygwin, bash 4.3)
1 parent ce0b201 commit d726732

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bashrc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ for c in {e,f,}grep {v,}dir ls; do alias $c="$c --color=auto"; done;
5353

5454
# So they can be unset.
5555
_aosc_bashrc_colors='NORMAL RED GREEN CYAN IRED YELLOW'
56-
NORMAL=$'\1\e[0m\2'
57-
RED=$'\1\e[1;31m\2'
58-
GREEN=$'\1\e[1;32m\2'
59-
CYAN=$'\1\e[1;36m\2'
56+
NORMAL=$'\\[\e[0m\\]'
57+
RED=$'\\[\e[1;31m\\]'
58+
GREEN=$'\\[\e[1;32m\\]'
59+
CYAN=$'\\[\e[1;36m\\]'
6060

6161
# Linux tty color workaround
6262
if [[ "$TERM" == linux ]]; then # && "$(tput colors)" == 8
63-
YELLOW=$'\1\e[1;33m' IRED=$'\1\e[0;31m\2'
63+
YELLOW=$'\\[\e[1;33m' IRED=$'\\[\e[0;31m\\]'
6464
else
65-
YELLOW=$'\1\e[1;93m' IRED=$'\1\e[0;91m\2'
65+
YELLOW=$'\\[\e[1;93m' IRED=$'\\[\e[0;91m\\]'
6666
fi
6767

6868
# A simple error level reporting function.
@@ -72,10 +72,10 @@ _ret_prompt() {
7272
0|130) # Input C-c, we have to override the \$
7373
((EUID)) && echo -n '$' || echo -n '#';;
7474
127) # Command not found
75-
echo -ne '\1\e[1;36m\2?'
75+
echo -ne '\01\e[1;36m\02?'
7676
;;
7777
*) # Other errors
78-
echo -ne '\1'$YELLOW'\2!'
78+
echo -ne '\01'$YELLOW'\02!'
7979
;;
8080
esac
8181
}

0 commit comments

Comments
 (0)