Just wanted to share my current prompt after a month or so polishing. Seems to be pretty darn good and figure I'll probably use this one for a good long time. (Yea right. ;-)
PROMPT_COMMAND='RET=$?; if [[ $RET -eq 0 ]]; then echo -ne "\n\033[0;32m$RET\033[0m ;-)"; else echo -ne "\033[0;31m$RET\033[0m :-(\n"; fi; echo -ne "\n"' PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' Gives the following return value (w/ smiley) separated by a few blank lines. (Ref. ArchLinux Wiki, but mine is better by adding a few additional newlines!) roger@localhost2 ~ $ echo 0 ;-) roger@localhost2 ~ $ echl bash: echl: command not found 127 :-( roger@localhost2 ~ $ I've also just incorporated the following PS4 value for shopt xtrace: PS4="$0 line ${LINENO}: " Output modifies xtrace stdout adding script name & line numbers. Wow, much more informative then the default xtrace stdout! (Ref. Oreilly's Learning_the_bash_Shell_Third_Edition) -- Roger http://rogerx.freeshell.org/