fish should ignore tty driver lnext and werase chars #3064

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

Projects

None yet

1 participant

@krader1961
Member
krader1961 commented May 25, 2016 edited

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 the bug label May 25, 2016
@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 from fish should undef all tty driver special chars to fish should ignore tty driver lnext and werase chars May 25, 2016
@krader1961
Member

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 added a commit that closed this issue May 25, 2016
@krader1961 krader1961 tty driver ignore lnext (\cV) and werase (\cW)
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
d120838
@krader1961 krader1961 modified the milestone: 2.3.1, fish-future May 25, 2016
@krader1961 krader1961 added a commit that referenced this issue Jun 20, 2016
@krader1961 krader1961 tty driver ignore lnext (\cV) and werase (\cW)
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
a243580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment