Move scrollback-push feature detection to fish script

A lot of terminals support CSI Ps S.  Currently we only allow them
to use scrollback-up if they advertise it via XTGETTCAP.  This seems
surprising; it's better to make visible in fish script  whether this
is supposed to be working.  The canonical place is in "bind ctrl-l"
output.

The downside here is that we need to expose something that's rarely
useful. But the namespace pollution is not so bad, and this gives
users a nice paper trail instead of having to look in the source code.
This commit is contained in:
Johannes Altmanninger
2025-09-26 20:12:49 +02:00
parent 06bbac8ed6
commit b964072c11
19 changed files with 137 additions and 55 deletions

View File

@@ -187,9 +187,7 @@ The following special input functions are available:
``scrollback-push``
pushes earlier output to the terminal scrollback, positioning the prompt at the top.
For compatibility with terminals that do not provide the ECMA-48 ``SCROLL UP`` command,
this command does nothing unless the terminal advertises support for that command via :ref:`XTGETTCAP <term-compat-xtgettcap>`.
This requires the terminal to implement the ECMA-48 :ref:`SCROLL UP <term-compat-indn>` command and :ref:`cursor position reporting <term-compat-cursor-position-report>`.
``complete``
guess the remainder of the current token