Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: bryanh@giraffe-data.com Newsgroups: gnu.bash.bug Subject: Backspace echoed incorrectly with TERM=garbage Date: Wed, 17 Jun 2020 21:30:25 +0000 Lines: 41 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org X-Trace: usenet.stanford.edu 1592431647 27387 209.51.188.17 (17 Jun 2020 22:07:27 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org 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/17 17:30:25 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, MISSING_MID=0.497, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Wed, 17 Jun 2020 18:07:25 -0400 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com gnu.bash.bug:16400 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.