summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-12-06 11:01:07 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-12-06 11:01:07 -0500
commit1d72c16c1f1b3d540ba51636dde5cc3caf8a9bb6 (patch)
tree50f7c531520b58e3397206b83f99de5c0fa6e6a6
parent8daf85a3e13a10f8e25f3c60713162057122e6e7 (diff)
bash/rc.sh: fix PS1 on non-colored terminals
-rw-r--r--.config/bash/rc.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh
index 447796a..633f81e 100644
--- a/.config/bash/rc.sh
+++ b/.config/bash/rc.sh
@@ -57,7 +57,7 @@ if tput setaf 1 &>/dev/null; then
_STATUS+="\$(v=\$?; [[ \$v = 0 ]] && c='${GREEN}' || c='${RED}'; printf %s%03i \$c \$v)"
_STATUS+="${RESET}${BOLD}]${RESET}"
else
- _STATUS='[$?]'
+ _STATUS='[$(printf "%03i" $?)]'
fi
PS1="${_STATUS} $(make_prompt)"'\n\$ '
unset RESET BOLD RED GREEN BLUE _STATUS