Prompt that warns you when programs fail

According to someone on Facebook, this prompt will switch to bold text if and when the previous command you execute returns a non-zero return value.

PS1='\[\e[$(($??1:0))m\][\u@\h \w]\[\e[0m\]: '

Leave a Reply

Your email address will not be published. Required fields are marked *