Query terminal only just before reading from it

Commit 5e317497ef (Query terminal before reading config, 2025-05-17)
disabled the kitty keyboard protocol in "fish -c read".  This seems
surprising, and it's not actually necessary that we query before
reading config; we only need query results before we read from
the TTY for the first time (which is about the time we call
__fish_config_interactive). Let's do that, reverting parts of
5e317497ef.
This commit is contained in:
Johannes Altmanninger
2025-09-25 19:22:37 +02:00
parent 7713e90aeb
commit 7e3fac561d
8 changed files with 80 additions and 81 deletions

View File

@@ -1696,6 +1696,8 @@ Fish also provides additional information through the values of certain environm
.. envvar:: fish_terminal
the name and version of the terminal fish is running inside (for example as reported via :ref:`XTVERSION <term-compat-xtversion>`).
This is initialized just before the first interactive prompt is shown (possibly via builtin :doc:`read <cmds/read>`),
that is, on the first ``fish_prompt`` or ``fish_read`` :ref:`event <event>`.
.. envvar:: history