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

fish should ignore tty driver lnext and werase chars #3064

Closed
krader1961 opened this issue May 25, 2016 · 1 comment
Closed

fish should ignore tty driver lnext and werase chars #3064

krader1961 opened this issue May 25, 2016 · 1 comment
Assignees
Labels
bug
Milestone

Comments

@krader1961
Copy link
Contributor

@krader1961 krader1961 commented May 25, 2016

The fix for issue #2894 added a binding for \cV. Which prompted the people testing it to notice they had to press \cV twice for the bound function to run. The reason is that the tty driver (kernel, not fish) binds \cV to the "lnext" function. Fish currently undefs stop (\cS) and start (\cQ) so that they can be used in the emacs bindings. Fish should undef all the tty special characters.

It should probably just put the driver in raw mode in which case it wouldn't need to undef any of the special chars. Whether that is a good idea will require looking at the current code to gauge how risky that would be.


For 2.3.1 release:

  • Update release notes
@krader1961 krader1961 added this to the fish-future milestone May 25, 2016
@krader1961 krader1961 self-assigned this May 25, 2016
@krader1961 krader1961 changed the title fish should undef all tty driver special chars fish should ignore tty driver lnext and werase chars May 25, 2016
@krader1961
Copy link
Contributor Author

@krader1961 krader1961 commented May 25, 2016

Okay, it turns out that fish is already putting the tty driver into non-canonical (i.e., raw) mode. However, it isn't disabling iexten mode which is why the werase (\cW) and lnext (\cV) chars are still being interpreted by the tty driver. So the solution is to disable IEXTEN mode.

Investigating this problem caused me to notice that fish_key_reader is not initializing the tty in the same manner as fish. Which is a horrendous bug because the former is meant to mimic the behavior of the latter with respect to handling interactive input. So I'm going to fix that at the same time as I fix the original problem.

@krader1961 krader1961 modified the milestones: 2.3.1, fish-future May 25, 2016
krader1961 added a commit that referenced this issue Jun 20, 2016
Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters
so they can be bound to fish functions.

Correct the `fish_key_bindings` program to initialize the tty in the same
manner as the `fish` program.

Fixes #3064
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.