when there are bind commands in the .bashrc of the machine that you transfer files to with scp, scp will complain
bind: warning: line editing not enabled
instead of putting the offensive commands into the .bash_profile (which means that they are not executed at all when you are opening a non-login shell), a better solution seems to be to check whether there is a terminal:
1 2 3 4 5 | case "$TERM" in xterm*|rxvt*) bind ..... ;; esac |
found on http://ubuntuforums.org/showpost.php?p=11270810&postcount=14
I would not restrict the TERM to anything by doing:
if [ ! -v TERM ]; then
bind…
fi
That didn’t work for me; I found the following though which works:
case “$-” in
*i*)
bind …..
esac
Hi, A useful tip! thanx a lot. I searched for this solution as I had the sourcing of bash_bindings before:
[ -z “$PS1” ] && return
which stops processing .bashrc entirely when not started in a shell. See https://github.com/aswen/dotfiles/commit/30229c061ed62a229777f56f9c0fa6a7e5d64da5
if [[ $- =~ i ]]; then
bind …
bind …
fi