nano-devel
[Top][All Lists]
Advanced

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

Re: Ctrl+H bug in nano 5.9


From: Benno Schulenberg
Subject: Re: Ctrl+H bug in nano 5.9
Date: Mon, 13 Dec 2021 13:12:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Op 12-12-2021 om 16:27 schreef shapiro@quantentunnel.de:
> So after reading the manual of nanorc, using the --raw option did the
> trick for me. I'm wiser now. ;)

So you first sent off an email and only then started reading the docs?
You think it's fine to waste other people's time?

> But it's still a bug, isn't it?

It's a bug, but not in nano.  You should have mentioned that you are
running nano on a BSD machine, probably ssh'ing into one.  If you run

  infocmp | grep -o kbs=..

on the relevant machine, it will say kbs=^H.  But if you type

  ^V <Backspace>

at the shell prompt, it will show ^? -- that is what Mate Terminal
produces.  So there is a mismatch between the terminal description
(from terminfo) and the actual terminal.  If you are ssh'ing into
the BSD machine and on your local machine 'infocmp | grep -o kbs=..'
says kbs=^?, and the ncurses on the remote machine is recent enough,
then you can fix things as follows.  On your local machine:

  infocmp -0 -Q2 -q  >termdef
  scp  termdef  user@remotemachine:termdef

Then on your remote machine:

  export TERMINFO=$(cat termdef)

After that, ncurses will recognize ^? as Backspace and will leave
^H be ^H, so that you can rebind it.  No --raw needed or wanted.


> Maybe it would be better, less
> irritating to enable the --raw option as default setting?

Do you really think that after twenty years and some 180 releases it
are nano's defaults that are wrong?  Sure, they /could/ be.  But is
it even remotely likely?

Benno

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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