<span style="color:#323232;"># Prompt
</span><span style="color:#323232;"># "Make it simple, just the dollar sign"
</span><span style="color:#323232;"># "Say no more, fam"
</span><span style="color:#323232;"># - if error code is not 0, then prepend [N] where N is the error code
</span><span style="color:#323232;"># - if user is root, use red and #
</span><span style="color:#323232;">blue='e[34m'
</span><span style="color:#323232;">red='e[31m'
</span><span style="color:#323232;">bold='e[1m'
</span><span style="color:#323232;">reset='e[0m'
</span><span style="color:#323232;">PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")['"$blue""$bold"']$['"$reset"'] '
</span><span style="color:#323232;">
</span><span style="color:#323232;">if [[ $EUID -eq 0 ]]; then
</span><span style="color:#323232;"> PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")['"$red""$bold"']#['"$reset"'] '
</span><span style="color:#323232;">fi
</span>
.inputrc:
<span style="color:#323232;"># vi mode, change to 'emacs' here if you prefer
</span><span style="color:#323232;">set editing-mode vi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># vi INSERT prompt
</span><span style="color:#323232;">set vi-ins-mode-string "1e[30;44m2 INS 1e[0m2 "
</span><span style="color:#323232;">
</span><span style="color:#323232;"># vi NORMAL prompt
</span><span style="color:#323232;">set vi-cmd-mode-string "1e[30;47m2 NOR 1e[0m2 "
</span>