Skip to main content
3 of 3
replaced http://stackoverflow.com/ with https://stackoverflow.com/

Further building on DaveEmme's answer here's what I finally put in my .bashrc to keep things simple:

case "$EMACS" in
    t)
    PROMPT_COMMAND=
    PS1="[\u@\h:\w]$ "
esac

Relying on the value of $TERM didn't work in my case whereas Emacs is required to set the $EMACS environment variable to true for any shells it spawns.