ridiculousfish 3cb105adbd Restore terminal modes after running key bindings with external commands
This concerns the behavior when running an external command from a key
binding. The history is:

Prior to 5f16a299a728, fish would run these external commands in shell
modes. This meant that fish would pick up any tty changes from external
commands (see #2114).

After 5f16a299a728, fish would save and restore its shell modes around
these external commands. This introduced a regression where anything the
user typed while a bound external command was executing would be echoed,
because external command mode has ECHO set in c_lflag. (This can be
reproed easily with `bind -q 'sleep 1'` and then pressing q and typing).
So 5f16a299a728 was reverted in fd9355966.

This commit partially reverts fd9355966. It has it both ways: external
commands are launched with shell modes, but/and shell modes are restored
after the external command completes. This allows commands to muck with
the tty, as long as they can handle getting shell modes; but it does not
enable ECHO mode so it fixes the regression found in #7770.

Fixes #7770. Fixes #2114 (for the third time!)

This partially reverts commit fd9355966ed4392b77137e522e7fb4b28503d674.
2021-03-10 22:36:33 -08:00
..
2020-06-08 17:33:04 +02:00
2020-11-22 14:39:48 +01:00
2020-11-22 14:39:48 +01:00
2020-11-11 19:20:55 +01:00
2021-01-03 17:48:25 +01:00
2020-06-24 20:43:56 +02:00
2020-09-22 16:13:24 +02:00
2020-11-22 14:39:48 +01:00
2020-11-22 14:39:48 +01:00
2020-12-06 15:39:54 +01:00
2020-11-22 14:39:48 +01:00
2020-06-13 15:21:40 +02:00
2020-09-27 09:22:45 +02:00
2020-11-22 14:39:48 +01:00
2021-01-07 23:53:31 +01:00
2020-11-06 17:56:38 +01:00