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


Groups > gnu.bash.bug > #16401

Re: Backspace echoed incorrectly with TERM=garbage

From Dennis Williamson <dennistwilliamson@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Backspace echoed incorrectly with TERM=garbage
Date 2020-06-17 17:18 -0500
Message-ID <mailman.2083.1592432336.2541.bug-bash@gnu.org> (permalink)
References <E1jlfdk-0006B3-GQ@lists.gnu.org> <CANaoh6KQf2kmZ7VC_0kV==-6ftDmQaUZs2HQF2kRzgnG5w2P-Q@mail.gmail.com>

Show all headers | View raw


On Wed, Jun 17, 2020, 5:07 PM <bryanh@giraffe-data.com> wrote:

> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -g -O2
> -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. -fstack-protector-strong
> -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security
> uname output: Linux rhino.giraffe-data.com 4.19.0-9-amd64 #1 SMP Debian
> 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 5.0
> Patch Level: 3
> Release Status: release
>
> Description:
>
>   With TERM environment variable set to an undefined terminal type, Bash
>   echoes a backspace as a space; I expect it to echo as a backspace
> (ctl-h).
>   It edits the line properly; it just isn't displayed correctly.
>
>   Other line editing functions have the same problem.
>
>   Setting TERM from the Bash prompt (to anything) puts things back to
> normal.
>
>   It worked (Backspace echoes as a ctl-H backspace character) in an earlier
>   version of Bash (don't know which one), but not in 5.0.3(1) from Debian
> or
>   5.1 from ftp.gnu.org.
>
> Repeat-By:
>
>   $ TERM=nosuchterm bash --norc
>
>   At the prompt, type the 7 keystrokes
>
>     l s q q BS BS CR
>
>   It echoes
>
>     l s q q SP SP CR LF
>
>   and performs an 'ls' command, showing that the line was properly edited.
>
>


I imagine that depends on your terminal and your stty settings. On MacOS
with Bash 5 in Terminal.app what you describe doesn't happen for me. What
terminal are you using? What is the output of stty -a with respect to
erase? What do you get in that setup when you press Ctrl-V then Backspace?

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Backspace echoed incorrectly with TERM=garbage Dennis Williamson <dennistwilliamson@gmail.com> - 2020-06-17 17:18 -0500

csiph-web