Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CLI mail app backspace broken
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 736

PostPosted: Thu May 02, 2024 2:30 am    Post subject: CLI mail app backspace broken Reply with quote

Inside a terminal window (xterm) backspace normally works as expected. However, when using 'mail' CLI program (from mailx package) both when typing the "Subject:" and the body when I press backspace I receive what looks like a ^H (shift-6 followed by "H") instead of erasing a character. Any idea where I should start looking to fix this? (Also if someone knows some other key combination to simulate a backspace, please let me know.)

For example on each line of the following I made an error (extra character) and pressed backspace. Only on the first line, before 'mail' runs, did backspace work as expected:

Code:
$ mail testuser@localhost
Subject: test messagee^H
This is a test linee^H
.
Cc:
$
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 110

PostPosted: Thu May 02, 2024 3:49 am    Post subject: Reply with quote

Just tested it on Mint from Windows Terminal using SSH and it works fine on BASH, SH, & ZSH. I'm suspecting the terminal emulator you are using is the issue.
_________________
[Never break the law to save people. Nope, there aint no heroes here. Unless you are 'Satoshi Nakamoto', that's a true anonymous.]
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 736

PostPosted: Thu May 02, 2024 4:15 am    Post subject: Reply with quote

Quote:
I'm suspecting the terminal emulator you are using is the issue.


Ok. That is correct. I just dropped down to a console (<ctrl><alt>F2) and there backspace in the mail CLI app works.

So what is wrong with xterm?
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1411
Location: Germany

PostPosted: Thu May 02, 2024 6:13 am    Post subject: Reply with quote

It is the backarrowKey functionality from https://linux.die.net/man/1/xterm

A good description can be found here: https://superuser.com/questions/993171/mobaxterm-backspace-sends-h

Quote:
The key labeled "backspace" is a matter of contention. Technically, it ought to send ^H simply because that is the name of the ASCII control character. Others differ, because their expectations have been affected by the history of this feature (see Why doesn't my delete key work?).

In a discussion where you say you are typing, the usual connotation (lacking clarification) is that you have started a terminal, then run a program within the terminal. For that case, there is a corresponding terminal initialization, e.g., using a shell and program such as stty. This is run on the local machine (where you are typing). MobaXterm provides stty since Version 3.2 (2011-05-30).


or here: https://invisible-island.net/xterm/xterm.faq.html#xterm_erase
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 736

PostPosted: Fri May 03, 2024 6:21 pm    Post subject: Reply with quote

Banana: Thank you for the links.

I tried two of the listed solutions without success.

However, I notice that in xterm when running a CLI program (ex: mail) when backspace does not work and I receive a ^H that <ctrl>backspace does work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum