[Top][All Lists]

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

Re: Backspace echoed incorrectly with TERM=garbage

From: Bryan Henderson
Subject: Re: Backspace echoed incorrectly with TERM=garbage
Date: 19 Jun 2020 23:53:20 +0000

I tracked it down to an Ncurses change.

Bash/readline attempts to move the cursor left by calling Ncurses (libtinfo)
function 'tputs' with ASCII BS (ctl-H) as the argument.  The function of
'tputs' is to write stuff to the terminal with delays added, as required by
early printing terminals.

In the past, if TERM were set to something undefined, tputs would go ahead and
write the BS to the terminal, but in the libtinfo linked to Bash on my Debian
10 system, tputs fails (returns failure code without writing anything to the
terminal) if TERM is set to something undefined.  (It still works if TERM
isn't defined at all, though).  Bash ignores the failure and continues,
writing a space to the terminal, followed by another failing call to 'tputs'
for the final backspace.

Debian 10 contains both the nonworking libtinfo (libtinfo.so.6) and a working
one (libtinfo.so.5), and my old copy of Bash links the working one.  That made
it look like something had changed in Bash to cause the breakage.

I wasn't able to find the source code for the working libtinfo, and there's
lots of conditional compilation in there, so I really can't tell why libtinfo

Bryan Henderson                                   San Jose, California

reply via email to

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