Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Andrew Church
>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 t

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Bryan Henderson
> 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 sp

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Dennis Williamson
On Thu, Jun 18, 2020, 6:03 PM Bryan Henderson wrote: > ... Any ideas on how I could see > the raw character stream sent to a terminal? > > Try the xev program. It will show X events and may reveal the keypresses you're interested in. >

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Bryan Henderson
> When you press Backspace to erase a character, what normally happens is that > three characters are sent to the terminal: backspace, space, and backspace. > ... > Is it possible that your terminal is receiving BS-space-BS and for whatever > reason, is ignoring/discarding the two BS characters, an

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Greg Wooledge
On Thu, Jun 18, 2020 at 08:53:57PM +, Bryan Henderson wrote: > I see this with an X.org xterm under Linux and a Linux virtual console, both > through SSH (Openssh), and Putty in Windows, via Putty's SSH. > > To simplify things, I set my erase key to "q" (stty erase q). ctl-V q > confirms term

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Bryan Henderson
> 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?

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Chet Ramey
On 6/17/20 5:30 PM, bry...@giraffe-data.com wrote: > 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 ed

Re: Bash-5.1-alpha available for download

2020-06-18 Thread Chet Ramey
On 6/17/20 12:28 PM, Andreas Schwab wrote: > mkdir -p -- > /home/abuild/rpmbuild/BUILDROOT/bash-5.0-lp151.10.125.1.x86_64/usr/share/man/man1 > ( cd ./po/ ; make > DESTDIR=/home/abuild/rpmbuild/BUILDROOT/bash-5.0-lp151.10.125.1.x86_64 > installdirs ) > make[1]: Entering directory '/home/abuild/

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Greg Wooledge
Also, of import in any terminal question is the content of your prompt (PS1 variable). See https://mywiki.wooledge.org/BashFAQ/053

Re: Backspace echoed incorrectly with TERM=garbage

2020-06-18 Thread Greg Wooledge
On Wed, Jun 17, 2020 at 09:30:25PM +, bry...@giraffe-data.com wrote: > 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. >