2018-07-16 08:03:42 UTC
I recently switched from configuring Readline in .inputrc to "bind"
commands in a file included from .bashrc . I find it more convenient,
because I can check in a single Bash configuration script into my
personal Git repository and use it in all my computers. Upgrading or
diff'ing it is faster. My personal config file is here:
However, after the switch, I am getting this warning:
bash: bind: warning: line editing not enabled
This happens only in Emacs 'shell' windows, and not on Emacs 'term'
windows or on other terminal emulators.
I saw that Bash turns line editing off when it sees an EMACS environment
variable. That variable is not present on my setup, and other people
report the same:
On a 'shell' Emacs window, this is what I get:
declare -x INSIDE_EMACS="26.1,comint"
declare -x TERM="dumb"
declare -x TERMCAP=""
On a 'term' Emacs window:
declare -x INSIDE_EMACS="26.1,term:0.96"
declare -x TERM="eterm-color"
declare -x TERMINFO="/home/rdiez/emacs-26.1-bin/share/emacs/26.1/etc/"
In both cases, Bash is interactive, which means that [ -t 1 ] returns true.
I am guessing that Bash turns off line editing based on the TERM
variable, but that is not documented (as far as I can see).
Is there a way to find out whether line editing is disabled, so that my
script should skip all the 'bind' commands for Readline?
Thanks in advance,