Skip to content

Place binds in a tty detection block? #19

Description

@MattMencel

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions