Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting backspace characters (0x08) in Text answers. #647

Open
snps-grafael opened this issue Oct 23, 2024 · 3 comments
Open

Getting backspace characters (0x08) in Text answers. #647

snps-grafael opened this issue Oct 23, 2024 · 3 comments

Comments

@snps-grafael
Copy link

snps-grafael commented Oct 23, 2024

Which operating system and Python version are you using?

Server is AlmaLinux8.10, running python 3.11.2 (Python 3.11.2 (main, May 25 2024, 11:01:50) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux), ssh client is MobaXterm, setting the TERM variable to "xterm-256color". The issue only occurs using MobaXterm, so I suspect terminfo and readchar hijinks.

Which version of this project are you using?

inquirer 3.1.3 (no relevant fixes appear in the changelog)
readchar 4.0.5

What did you do?

Use backspace in a Text prompt. (Same with ^W and ^U)

What did you expect to see?

The characters to delete are deleted and don't show up in the string output.

What did you see instead?

The characters to delete remain in the string output, followed by 0x08 bytes (backspace characters). The same thing happens with ^W characters (0x17, word clear characters) and ^U (0x15 clear to start characters).

@Cube707
Copy link
Collaborator

Cube707 commented Oct 23, 2024

0x08 is the Backspace-character under windows, not linux. It is expected behaviour that sending a 0x08 byte to a linux system is not detected as Backspace.

I belive this is a mobaXterm issue and it works fine over a normal ssh connection. Can you confirm?

@Cube707
Copy link
Collaborator

Cube707 commented Oct 23, 2024

This is probably related to magmax/python-readchar#50, but I have no Idea on how to proceed towards fixing that issue.

@snps-grafael
Copy link
Author

I can confirm that I can only reproduce this issue via mobaxterm, and yes, it probably is related to readchar and the TERM and terminfo for that terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants