summaryrefslogtreecommitdiff
path: root/shellrc/prompt.sh
blob: 7a857da0b4ee615de5e07b2a35d19d14b670050b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# Better prompt
case "$TERM" in
	xterm*|rxvt*)
		export PS1='$(EC=$?
[ $EC = 0 ] || echo -n "\e[1;33m$EC:"
if [ `id -u` -eq "0" ]; then
	echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] "
else
	echo -n "\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] "
fi)'
		;;
esac