terminal-compatibility: Remove "Origin" column

This isn't very useful, makes the table very wide and invites discussion on who exactly invented
what.

Let's leave that to the historians.

Fixes #12031
This commit is contained in:
Fabian Boehm
2025-11-08 14:52:56 +01:00
parent 8e4fa9aafb
commit 8c69e62a78

View File

@@ -27,47 +27,36 @@ Required Commands
* - Sequence
- TI
- Description
- Origin
* - ``\r``
- n/a
- Move cursor to the beginning of the line
-
* - ``\n``
- cud1
- Move cursor down one line.
-
* - ``\e[ Ps A``
- cuu
- Move cursor up Ps columns, or one column if no parameter.
- VT100
* - ``\e[ Ps C``
- cuf
- Move cursor to the right Ps columns, or one column if no parameter.
- VT100
* - ``\x08``
- cub1
- Move cursor one column to the left.
- VT100
* - ``\e[ Ps D``
- cub
- Move cursor to the left Ps times.
- VT100
* - ``\e[H``
- cup
- Set cursor position (no parameters means: move to row 1, column 1).
- VT100
* - ``\e[K``
- el
- Clear to end of line.
- VT100
* - ``\e[J``
- ed
- Clear to the end of screen.
- VT100
* - ``\e[2J``
- clear
- Clear the screen.
- VT100
* - .. _term-compat-primary-da:
``\e[0c``
@@ -77,16 +66,13 @@ Required Commands
Failure to implement this will cause a brief pause at startup followed by a warning.
For the time being, both can be turned off by turning off the ``query-terminal`` :ref:`feature flag <featureflags>`.
- VT100
* - n/a
- am
- Soft wrap text at screen width.
-
* - n/a
- xenl
- Printing to the last column does not move the cursor to the next line.
Verify this by running ``printf %0"$COLUMNS"d 0; sleep 3``
-
Optional Commands
-----------------
@@ -98,73 +84,56 @@ Optional Commands
* - Sequence
- TI
- Description
- Origin
* - ``\t``
- it
- Move the cursor to the next tab stop (à 8 columns).
This is mainly relevant if your prompt includes tabs.
-
* - ``\e[m``
- sgr0
- Turn off bold/dim/italic/underline/reverse attribute modes and select default colors.
-
* - ``\e[1m``
- bold
- Enter bold mode.
-
* - ``\e[2m``
- dim
- Enter dim mode.
-
* - ``\e[3m``
- sitm
- Enter italic mode.
-
* - ``\e[4m``
- smul
- Enter underline mode.
-
* - ``\e[4:2m``
- Su
- Enter double underline mode.
- kitty
* - ``\e[4:3m``
- Su
- Enter curly underline mode.
- kitty
* - ``\e[4:4m``
- Su
- Enter dotted underline mode.
- kitty
* - ``\e[4:5m``
- Su
- Enter dashed underline mode.
- kitty
* - ``\e[7m``
- rev
- Enter reverse video mode (swap foreground and background colors).
-
* - ``\e[23m``
- ritm
- Exit italic mode.
-
* - ``\e[24m``
- rmul
- Exit underline mode.
-
* - ``\e[38;5; Ps m``
- setaf
- Select foreground color Ps from the 256-color-palette.
-
* - ``\e[48;5; Ps m``
- setab
- Select background color Ps from the 256-color-palette.
-
* - ``\e[58:5: Ps m`` (note: colons not semicolons)
- Su
- Select underline color Ps from the 256-color-palette.
- kitty
* - ``\e[ Ps m``
- setaf
setab
@@ -173,27 +142,21 @@ Optional Commands
40-47 maps to background 0-7,
90-97 maps to foreground 8-15 and
100-107 maps to background 8-15.
-
* - ``\e[38;2; Ps ; Ps ; Ps m``
-
- Select foreground color from 24-bit RGB colors.
-
* - ``\e[48;2; Ps ; Ps ; Ps m``
-
- Select background color from 24-bit RGB colors.
-
* - ``\e[49m``
-
- Reset background color to the terminal's default.
-
* - ``\e[58:2:: Ps : Ps : Ps m`` (note: colons not semicolons)
- Su
- Select underline color from 24-bit RGB colors.
- kitty
* - ``\e[59m``
- Su
- Reset underline color to the default (follow the foreground color).
- kitty
* - .. _term-compat-indn:
``\e[ Ps S``
@@ -201,11 +164,9 @@ Optional Commands
- Scroll up the content (not the viewport) Ps lines (called ``SCROLL UP`` / ``SU`` by ECMA-48 and "scroll forward" by terminfo).
When fish detects support for this feature, :ref:`status test-terminal-features scroll-content-up <status-test-terminal-features>` will return 0,
which enables the :kbd:`ctrl-l` binding to use the :ref:`scrollback-push <special-input-functions-scrollback-push>` special input function.
- ECMA-48
* - ``\e[= Ps u``, ``\e[? Ps u``
- n/a
- Enable the kitty keyboard protocol.
- kitty
* - .. _term-compat-cursor-position-report:
``\e[6n``
@@ -218,80 +179,64 @@ Optional Commands
This is used by the :ref:`scrollback-push <special-input-functions-scrollback-push>` special input function,
and inside terminals that implement the OSC 133 :ref:`click_events <term-compat-osc-133>` feature.
- VT100
* - ``\e[ \x20 q``
- Se
- Reset cursor style to the terminal's default. This is not used as of today but may be
in future.
- VT520
* - ``\e[ Ps \x20 q``
- Ss
- Set cursor style (DECSCUSR); Ps is 2, 4 or 6 for block, underscore or line shape.
- VT520
* - .. _term-compat-xtversion:
``\e[ Ps q``
- n/a
- Request terminal name and version (XTVERSION).
This is only used for temporary workarounds for incompatible terminals.
- XTerm
* - ``\e[?25h``
- cvvis
- Enable cursor visibility (DECTCEM).
- VT220
* - ``\e[?1004h``
- n/a
- Enable focus reporting.
-
* - ``\e[?1004l``
- n/a
- Disable focus reporting.
-
* - ``\e[?1049h``
- n/a
- Enable alternate screen buffer.
- XTerm
* - ``\e[?1049l``
- n/a
- Disable alternate screen buffer.
- XTerm
* - ``\e[?2004h``
-
- Enable bracketed paste.
- XTerm
* - ``\e[?2004l``
-
- Disable bracketed paste.
- XTerm
* - .. _term-compat-osc-0:
``\e]0; Pt \x07``
- ts
- Set terminal window title (OSC 0). Used in :doc:`fish_title <cmds/fish_title>`.
- XTerm
* - ``\e]2; Pt \x07``
- ts
- Set terminal tab title (OSC 2). Used in :doc:`fish_tab_title <cmds/fish_tab_title>`.
- iTerm2
* - ``\e]7;file:// Pt / Pt \x07``
-
- Report working directory (OSC 7).
Since the terminal may be running on a different system than a (remote) shell,
the hostname (first parameter) will *not* be ``localhost``.
- iTerm2
* - .. _term-compat-osc-8:
``\e]8;; Pt \e\\``
-
- Create a `hyperlink (OSC 8) <https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>`_.
This is used in fish's man pages.
- GNOME Terminal
* - .. _term-compat-osc-52:
``\e]52;c; Pt \x07``
-
- Copy to clipboard (OSC 52). Used by :doc:`fish_clipboard_copy <cmds/fish_clipboard_copy>`.
- XTerm
* - .. _term-compat-osc-133:
``\e]133;A; click_events=1\x07``
@@ -299,15 +244,12 @@ Optional Commands
- Mark prompt start (OSC 133), with kitty's ``click_events`` extension.
The ``click_events`` extension enables mouse clicks to move the cursor or select pager items,
assuming that :ref:`cursor position reporting <term-compat-cursor-position-report>` is available.
- FinalTerm, kitty
* - ``\e]133;C; cmdline_url= Pt \x07``
-
- Mark command start (OSC 133), with kitty's ``cmdline_url`` extension whose parameter is the URL-encoded command line.
- FinalTerm, kitty
* - ``\e]133;D; Ps \x07``
-
- Mark command end (OSC 133); Ps is the exit status.
- FinalTerm
* - .. _term-compat-xtgettcap:
``\eP+q Pt \e\\``
@@ -320,9 +262,6 @@ Optional Commands
The second variant's second parameter is ignored.
Currently, fish only queries the :ref:`indn <term-compat-indn>` string capability.
- XTerm (but without string capabilities), kitty;
also adopted by foot, wezterm, contour, ghostty
.. _term-compat-dcs-gnu-screen: