zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Pier Paolo Grassi <pierpaolog@gmail.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: How to see history 'expression' in history rather than the expansion?
Date: Mon, 13 Jun 2022 09:02:34 -0700	[thread overview]
Message-ID: <CAH+w=7bz8zfr=k01RNwtw7TfE_JKXO_N1iY8i4A34ncRVi=N6g@mail.gmail.com> (raw)
In-Reply-To: <CAP+y1xDSVF_TKhGNsWos1gApdsXG=E-w+nkxD-Tq3FbpRWdsXg@mail.gmail.com>

On Mon, Jun 13, 2022 at 3:34 AM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
>
> Hi Bart, can you elaborate on this? when/why does this happen?

I've mostly encountered it when using ssh to log in to hosts with
different operating systems (or sometimes even different revisions of
what's supposedly the same OS).  In fact I've hit it so often that my
.zlogin has this:

function stty_backspace {
    local bs
    while (( #bs != 8 && #bs != 127 ))
    do
        print -n 'Press backspace: '
        read -k 1 bs || return 1
        print -nP '\r%E'
    done
    stty erase "$bs"
}

This forces the local erase character to be set to whatever it
perceives the keyboard to be sending for whatever key my muscle-memory
whacks when I want to back up one character, so that editors etc.
match the zsh behavior.  I never change the default zsh bindings that
make ctrl-h and del both backward-delete-char, so in ZLE I don't care.

It's less an issue if you never find yourself moving between a Mac
laptop and a Windows PC and more than one Linux desktop on your local
end and probably not an issue at all if everything is also homogeneous
on the remote end.


      parent reply	other threads:[~2022-06-13 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12 13:17 zzapper
2022-06-12 16:16 ` Bart Schaefer
2022-06-13 10:33   ` Pier Paolo Grassi
2022-06-13 10:43     ` Peter Stephenson
2022-06-13 16:02     ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7bz8zfr=k01RNwtw7TfE_JKXO_N1iY8i4A34ncRVi=N6g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=pierpaolog@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).