lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] zsh keybindings on remote redhat server


From: Vadim Zeitlin
Subject: Re: [lmi] zsh keybindings on remote redhat server
Date: Thu, 13 Feb 2020 15:34:29 +0100

On Thu, 13 Feb 2020 13:14:10 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2020-02-13 00:37, Vadim Zeitlin wrote:
GC> > On Wed, 12 Feb 2020 23:43:45 +0000 Greg Chicares <address@hidden> wrote:
GC> > 
GC> > GC> On 2019-10-25 02:17, Greg Chicares wrote:
GC> 
GC> [...need explicit 'bindkey '\e[3~' delete-char' in ~/.zshrc ...]
GC> 
GC> > GC> Otherwise, when SSHing from a corporate laptop into a redhat server,
GC> > GC> pressing Del...
GC> > GC>  - in viins mode: switches to vicmd mode
GC> > GC>  - in vicmd mode: changes the case of the character under the cursor
GC> > 
GC> >  I am not sure why does this happen,

 Sorry, I've realized that I should have been more precise, as usual: what
I meant to say was that I didn't know why the behaviour differed between
the 2 machines.

GC> SSHing into that server, without binding Del, I type:
GC>   jjjjjjjjj
GC>       ^
GC> and use the arrow keys to position the cursor at the fifth of nine 
characters,
GC> then press Del. Result:
GC>   jjjJJJjjj
GC> The reason is that transmitting '\e[3~' has this effect:
GC>   '\e' enters vicmd mode
GC>   '[' is consumed with no effect
GC>       (it sets context for an ensuing command like '%', but
GC>       here no ensuing command uses that context)
GC>   '3' repeats the ensuing command three times
GC>   '~' changes case
GC> so the case of three successive characters is changed.

 So this is indeed absolutely correct, but still doesn't explain, to me,
why do you need to bind the key explicitly in some configurations but not
the others, especially...

GC> Thanks. I wrote the output of infocmp to a file, transferred it to my
GC> real computer, and did
GC>   git diff --no-index ~/Downloads/infocmp.redhat =(infocmp)
GC> which shows that the files are largely identical.

... if there are no differences in terminfo. The only remaining explanation
I have is that there is already bindkey in one of zsh startup files on the
system where it works out of the box.

 In any case, practically speaking, I don't see any problem with having
this bindkey in your .zshrc. I don't think there can be any other keys
producing this code and even if it's redundant, there is no harm in doing
it, it's not like it takes long to create or update a key binding, so it
shouldn't have any effect on shell startup time or anything like that.

 Regards,
VZ

Attachment: pgprF8u5N2k0U.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]