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

Unix read does not respect backspace under mistty (macos) #12

Open
candera opened this issue Oct 16, 2023 · 2 comments
Open

Unix read does not respect backspace under mistty (macos) #12

candera opened this issue Oct 16, 2023 · 2 comments

Comments

@candera
Copy link

candera commented Oct 16, 2023

Use of read under mistty does not correctly handle backspace:

{master !2 ?2}
~/projects/emacs candera@brightmoon $ read -p "Yes? "
Yes? No, no^?^?^?no
{master !2 ?2}
~/projects/emacs candera@brightmoon $ echo $REPLY
No, no���no
{master !2 ?2}
~/projects/emacs candera@brightmoon $ 

Untitled 2

@szermatt
Copy link
Owner

szermatt commented Oct 16, 2023

This happens under macos, but not Linux.

/usr/bin/read, bash and zsh read don't handle \x7f (nor ^H). Yet, this works under macos Terminal app or iTerm, which both send \x7f by default. This also doesn't work in Emacs ansi-term, so it's an issue inherited from term.el. Fish read always works.

I haven't been able to figure out what's happening yet.

As a workaround, under bash, read -e works.

@candera
Copy link
Author

candera commented Oct 16, 2023

Ah, OK, -e works for the case I need.

Thanks again!

@szermatt szermatt changed the title Unix read does not respect backspace under mistty Unix read does not respect backspace under mistty (macos) Nov 4, 2023
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