[Top][All Lists]

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

Re: Backspace echoed incorrectly with TERM=garbage

From: Dennis Williamson
Subject: Re: Backspace echoed incorrectly with TERM=garbage
Date: Wed, 17 Jun 2020 17:18:40 -0500

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?

reply via email to

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