Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: up-arrow for history 'broken' after ssh
- X-seq: zsh-users 25012
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: up-arrow for history 'broken' after ssh
- Date: Mon, 3 Aug 2020 04:01:25 +0200
- Authentication-results: atlas202.free.mail.ir2.yahoo.com; spf=pass smtp.mailfrom=zsh.org; dmarc=unknown
- Cc: TJ Luoma <luomat@xxxxxxxxx>, Zsh MailingList <zsh-users@xxxxxxx>
- In-reply-to: <CAH+w=7YX=yzxjBRiC9piGv37QYB9ocjg-U0G7_ySyegJLLLFDw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, TJ Luoma <luomat@xxxxxxxxx>, Zsh MailingList <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHucU=rxFupWKgUThSRHYQu-kTDGY6ANcWZe0fePCaCh4g@mail.gmail.com> <CAN=4vMqkgmwqgH5+4rArHdUfnqvsaKYG+cOHEptexF_WcoXg0w@mail.gmail.com> <CAH+w=7YX=yzxjBRiC9piGv37QYB9ocjg-U0G7_ySyegJLLLFDw@mail.gmail.com>
- Sender: zsh-users@xxxxxxx
On 2020-07-28 17:48:55 -0700, Bart Schaefer wrote:
> On Tue, Jul 28, 2020 at 10:43 AM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > 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
> >
> > There are several ways to fix this.
>
> 4. (Assumes ssh starts a login shell) Change terminal mode back to raw
> in ~/.zlogout on the remote machine
> 5. Create a script to set as the ProxyCommand in your .ssh/config that
> resets the terminal mode after ssh exits
This won't work if the SSH session has to be disconnected from
the client (with ~.), e.g. after a network related issue.
I do all the cleanup in precmd(), e.g.
[[ -n $TTY && -n $terminfo ]] &&
{ echoti rmacs; echoti sgr0; echoti cnorm } > /dev/tty 2> /dev/null
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author