bash-sensible icon indicating copy to clipboard operation
bash-sensible copied to clipboard

Place binds in a tty detection block?

Open MattMencel opened this issue 8 years ago • 1 comments

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.

MattMencel avatar Apr 04 '17 14:04 MattMencel

#18 would probably be a better solution to this and related issues, will definitely look into it.

mrzool avatar Apr 05 '17 19:04 mrzool