Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Bryan Henderson 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: References: <75996.bryanh@giraffe-data.com> <20200618214140.GT19673@eeg.ccf.org> <13540.bryanh@giraffe-data.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 Envelope-to: bug-bash@gnu.org In-reply-to: (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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <69359.bryanh@giraffe-data.com> X-Mailman-Original-References: <75996.bryanh@giraffe-data.com> <20200618214140.GT19673@eeg.ccf.org> <13540.bryanh@giraffe-data.com> Xref: csiph.com gnu.bash.bug:16410 > 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