Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: achurch@achurch.org (Andrew Church) Newsgroups: gnu.bash.bug Subject: Re: Backspace echoed incorrectly with TERM=garbage Date: Fri, 19 Jun 2020 13:30:38 +0900 Lines: 25 Approved: bug-bash@gnu.org Message-ID: References: <69359.bryanh@giraffe-data.com> <5eec3f9e.63073@msgid.achurch.org> NNTP-Posting-Host: lists.gnu.org Content-Type: text/plain; charset=utf-8 X-Trace: usenet.stanford.edu 1592541103 9451 209.51.188.17 (19 Jun 2020 04:31:43 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: bryanh@giraffe-data.com Envelope-to: bug-bash@gnu.org X-wmail-status: normal In-Reply-To: <69359.bryanh@giraffe-data.com> X-Mailer: MMail v5.51 Received-SPF: pass client-ip=153.246.140.138; envelope-from=achurch@achurch.org; helo=achurch.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 00:31:30 X-ACL-Warn: Detected OS = Linux 2.2.x-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_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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: <5eec3f9e.63073@msgid.achurch.org> Xref: csiph.com gnu.bash.bug:16411 >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 I can reproduce this behavior, using bash 4.4(23) and readline 7.0(5): read(0, "\177", 1) = 1 write(2, " ", 1) = 1 I also have ncurses-6.2, with readline linking directly to libtinfo. If I link readline against ncurses-5.9 (forcing -lncurses), the problem goes away: read(0, "\177", 1) = 1 write(2, "\10 \10", 3) = 3 So the problem may be either in ncurses itself or in readline's interaction with ncurses/libtinfo. --Andrew Church http://achurch.org/