I have the following in my .bashrc:
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
However, when I call shell from within Emacs, I get the following message:
bash: bind: warning: line editing not enabled
bash: bind: warning: line editing not enabled
And as a consequence my prompt gets messed up.
How can I detect (from within my .bashrc), that my shell is being called from emacs or, alternatively, not from a standard terminal?
My goal is to wrap the calls to bind so that they are only executed in a proper terminal.