Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16410

Re: Backspace echoed incorrectly with TERM=garbage

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Bryan Henderson <bryanh@giraffe-data.com>
Newsgroups gnu.bash.bug
Subject Re: Backspace echoed incorrectly with TERM=garbage
Date 19 Jun 2020 02:30:35 +0000
Lines 37
Approved bug-bash@gnu.org
Message-ID <mailman.102.1592534927.2574.bug-bash@gnu.org> (permalink)
References <E1jlfdk-0006B3-GQ@lists.gnu.org> <CANaoh6KQf2kmZ7VC_0kV==-6ftDmQaUZs2HQF2kRzgnG5w2P-Q@mail.gmail.com> <75996.bryanh@giraffe-data.com> <20200618214140.GT19673@eeg.ccf.org> <13540.bryanh@giraffe-data.com> <CANaoh6J1ttm_Mqm1m7Equ4k02LYLLZ=Ao3A8L30mM=77h_ysOA@mail.gmail.com> <69359.bryanh@giraffe-data.com>
NNTP-Posting-Host lists.gnu.org
X-Trace usenet.stanford.edu 1592534927 5338 209.51.188.17 (19 Jun 2020 02:48:47 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Dennis Williamson <dennistwilliamson@gmail.com>
Envelope-to bug-bash@gnu.org
In-reply-to <CANaoh6J1ttm_Mqm1m7Equ4k02LYLLZ=Ao3A8L30mM=77h_ysOA@mail.gmail.com> (dennistwilliamson@gmail.com)
Received-SPF pass client-ip=174.143.232.82; envelope-from=bryanh@giraffe-data.com; helo=oldrhino.giraffe-data.com
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/18 22:48:42
X-ACL-Warn Detected OS = Linux 3.x [generic] [fuzzy]
X-Spam_score_int -18
X-Spam_score -1.9
X-Spam_bar -
X-Spam_report (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <69359.bryanh@giraffe-data.com>
X-Mailman-Original-References <E1jlfdk-0006B3-GQ@lists.gnu.org> <CANaoh6KQf2kmZ7VC_0kV==-6ftDmQaUZs2HQF2kRzgnG5w2P-Q@mail.gmail.com> <75996.bryanh@giraffe-data.com> <20200618214140.GT19673@eeg.ccf.org> <13540.bryanh@giraffe-data.com> <CANaoh6J1ttm_Mqm1m7Equ4k02LYLLZ=Ao3A8L30mM=77h_ysOA@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16410

Show key headers only | View raw


> Try the xev program. It will show X events and may reveal the keypresses
> you're interested in.

Thanks.  The mystery here is on the other side - things received by the
terminal, not keys pressed.

But I thought of 'strace'.  I attached that to the Bash process and
clearly saw it sending only space characters, no backspaces:

pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "q", 1)                         = 1
write(2, " ", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "q", 1)                         = 1
write(2, " ", 1)                        = 1

Compared to the better Bash 4 behavior:

read(0, "q", 1)                         = 1
write(2, "\10 \10", 3)                  = 3
read(0, "q", 1)                         = 1
write(2, "\10 \10", 3)                  = 3

(N.B. "q" is the "erase" character for this experiment).
(N.B. "\10" is ASCII backspace (ctl-H) in octal)


I see what is probably the crucial difference between my working Bash 4 and
my nonworking Bash 5:  Different Ncurses shared libraries.  The former uses
libncurses.so.5 _and_ libtinfo.so.5, while the latter uses only
libtinfo.so.6.

Still doesn't explain why this is a problem only for me, though.

-- 
Bryan Henderson                                   San Jose, California

Back to gnu.bash.bug | Previous | NextNext in thread | Find similar


Thread

Re: Backspace echoed incorrectly with TERM=garbage Bryan Henderson <bryanh@giraffe-data.com> - 2020-06-19 02:30 +0000
  Re: Backspace echoed incorrectly with TERM=garbage Ralf Goertz <me@myprovider.invalid> - 2020-06-19 09:41 +0200

csiph-web