bash-sensible
bash-sensible copied to clipboard
Place binds in a tty detection block?
When I scp to a host that I've added the sensible.bash to my ~/.bashrc, I see bind warnings.
/home/matt/bin/sensible.bash: line 28: bind: warning: line editing not enabled
I placed the binds in a TTY detection block like explained here: https://superuser.com/questions/892658/remote-ssh-commands-bash-bind-warning-line-editing-not-enabled
if [ -t 1 ]
then
# standard output is a tty
# do interactive initialization
# Enable history expansion with space
# E.g. typing !!<space> will replace the !! with your last command
bind Space:magic-space
...
fi
Works well for this.
#18 would probably be a better solution to this and related issues, will definitely look into it.