Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: up-arrow for history 'broken' after ssh

On Tue, Jul 28, 2020 at 2:39 PM TJ Luoma <luomat@xxxxxxxxx> wrote:
> However, when I ssh from my Mac to a Linux machine [...]
> and then exit ssh, my 'up arrow' goes back one at a time

You almost certainly have different zle widgets bound to different key
sequences that correspond to up-arrow-key in raw and application

There are several ways to fix this.

1. Use `bind -s` to translate application mode key sequences to raw
and then bind only raw sequences to widgets (or the other way around).
This is my favorite.
2. Bind all widgets twice if you want to bind them to arrow keys or home/end.
3. Hook zle-line-init and change terminal mode to application/raw.
This is the most error prone method of the three. It breaks whenever
terminal mode is changed by a widget (as opposed to by a command) and
when you use some zsh plugins.


Messages sorted by: Reverse Date, Date, Thread, Author