+PROMPT_COMMAND=__prompt_command
+
+__prompt_command () {
+ local ret="$?"
+ PS1=""
+ d="\[\033[00;00m\]"
+ red="\[\033[01;31m\]"
+ bgreen="\[\033[01;32m\]"
+ green="\[\033[00;32m\]"
+ blue="\[\033[94m\]"
+
+ # Ensure new line before the prompt
+ PS1='$(printf "%$((`tput cols`-1))s\r")'
+ if [[ $ret != 0 ]]; then
+ PS1+="$red$ret $d"
+ fi
+ PS1+='$(running_jobs)'