Sublime Forum

Latest Dev Builds broke Terminus with Fish Shell

#1

I use Terminus for quick Terminal interactions and with the latest Dev Builds I see random characters in the terminal input when using fish shell. Everything worked fine till 4192.
This issue is reproducible on different machines (tested with my M4 MBP and Mac Studio both running latest MacOS).

Here is an example how it looks and the characters keep randomly shifting through input text when typing.

28

0 Likes

#2

4192 is a stable build; can you clarify which build you’re having issues with?

0 Likes

#3

Everything worked fine till and including 4192.
The latest Dev Builds seem to have caused trouble. Currently I am on 4195.

It seems to have to do with the command completion preview in fish shell. zsh doesn’t do it and therefore those random characters are not appearing.
Happens on Fish Shell with https://starship.rs

0 Likes

#4

Update. I checked the stable build again and the weirdness is also there. Seems to be fish / terminus related. Other Terminals (Ghostty, iTerm2, vscode etc.) behave normally…
When I jump into bash or zsh it also works normally. I’ll open an issue over at the terminus repo.

0 Likes

#5

same issue
when I open Terminus, I see 「5u」
24
Sublime 4192 here

0 Likes

#6

This issue is neither related with nor caused by Sublime Text.

This issue was introduced by Fish 4.0.0.

fish sends an escape sequence \x1b[=5u, which is not recognized and thus passed through as “5u” by pyte python package used by Terminus to communicate with terminal backends.

It appears to be related with https://github.com/selectel/pyte/issues/141.

According to https://www.man7.org/linux/man-pages/man4/console_codes.4.html \x1b[= and \x1b[> don’t seem to support further arguments such as 5u.

And here’s the related Fish issue:

According to Fish Changelog:

  • fish now requests XTerm’s modifyOtherKeys keyboard encoding and kitty keyboard protocol's <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>_ progressive enhancements (:issue:10359).
    Depending on terminal support, this allows to binding more key combinations, including arbitrary combinations of modifiers :kbd:ctrl, :kbd:alt and :kbd:shift, and distinguishing (for example) :kbd:ctrl-i from :kbd:tab.

    Additionally, bind now supports a human-readable syntax in addition to byte sequences.
    This includes modifier names, and names for keys like :kbd:enter and :kbd:backspace.
    For example

    • bind up 'do something' binds the up-arrow key instead of a two-key sequence (“u” and then “p”)
    • bind ctrl-x,alt-c 'do something' binds a sequence of two keys.

    Any key argument that starts with an ASCII control character (like \e or \cX) or is up to 3 characters long, not a named key, and does not contain , or - will be interpreted in the old syntax to keep compatibility for the majority of bindings.

    Keyboard protocols can be turned off by disabling the “keyboard-protocols” feature flag::

    set -Ua fish_features no-keyboard-protocols
    

    This is a temporary measure to work around buggy terminals (:issue:11056), which appear to be relatively rare.
    Use this if something like “=0” or “=5u” appears in your commandline mysteriously.

1 Like

#7

Thx for coming back to this thread. I also found it out and disabled it via
set -Ua fish_features no-keyboard-protocols

Fixed it for now. Sorry for not updating the thread. I completely forgot about it.

0 Likes