From 1d72c16c1f1b3d540ba51636dde5cc3caf8a9bb6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 6 Dec 2013 11:01:07 -0500 Subject: bash/rc.sh: fix PS1 on non-colored terminals --- .config/bash/rc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-54-g00ecf