kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.39k stars 980 forks source link

kitty outputs a lot of text when an ssh connection is interrupted #6307

Closed furrycatherder closed 1 year ago

furrycatherder commented 1 year ago

Describe the bug I use alias ssh="kitty +kitten ssh" as suggested. When I interrupt a hanging SSH connection, it outputs a lot of text like this to the console:

: 1685136788:0;KITTY_DATA_START
: 1685136788:0;OK
: 1685136788:0;H4sIAAAAAAAC/+y9fWwcyZcY1lzpd7/biWMbiOMvOZf6NYdLjsQZzheHErmzuxJJrfhbieRPpFa7S/I36umu4fSPPd2zXd0cUhT3zg6SABcghhMEMRwbB9iwgziGA5/zYRhJnA/k4ASIkSAG8oXgDCOwESBBEifBJf7jFNR7Vd3VX0NJ++HbOxHSzFR31atXVa9evffq1atd4+wBNSzqs1p9yTICo8aG2jf8V8e/ou96o9WMfsPzRqPdaWrkTP
: 1685136788:0;sO/kIWGL5Wr2u/M/9adWIE9oh2G53by41WZ+V2vbbSbN7pNDut5VKrTsypb0fFb7W3f9+Dv29pymfmf6fdLpz/y42W1mi3W+1ms9lptLV6o77caGqk/n2a/+nGfU/+6NnY8wMyv7/5+NF8d/4soP6oemIHwfl8Sb5b33m481hkCPyQmp7j+fHrT7b29z/vPd3a3th52tvamO/ON+KX+BieLtdbrUan00yX3Huw+fBhb2t7f/Pjx3f3t3a257vz

(This is from my ~/.zsh_history.)

It seems the only way to handle this when it happens is to close the window completely. It's especially painful because it interferes with zsh-autosuggestions and pollutes my history.

To Reproduce Steps to reproduce the behavior:

  1. ssh <host>
  2. Interrupt (^C) before the connection is established.
  3. Observe.

Environment details

kitty 0.28.1 created by Kovid Goyal
Linux mochi 6.3.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sun, 21 May 2023 16:10:30 +0000 x86_64
Arch Linux 6.3.3-zen1-1-zen (/dev/tty)

Running under: X11
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /bin/zsh
Loaded config files:
  /home/swim/.config/kitty/kitty.conf

Config options different from defaults:
enable_audio_bell       False
font_family             iosevka term
font_size               16.0
window_padding_width    FloatEdges(left=20.0, top=20.0, right=20.0, bottom=20.0)
Changed shortcuts:
    kitty_mod+enter →  new_window_with_cwd
Colors:
    active_tab_background   #7aa2f7   
    active_tab_foreground   #16161e   
    background              #1a1b26   
    color0                  #15161e   
    color1                  #f7768e   
    color10                 #9ece6a   
    color11                 #e0af68   
    color12                 #7aa2f7   
    color13                 #bb9af7   
    color14                 #7dcfff   
    color15                 #c0caf5   
    color16                 #ff9e64   
    color17                 #db4b4b   
    color2                  #9ece6a   
    color3                  #e0af68   
    color4                  #7aa2f7   
    color5                  #bb9af7   
    color6                  #7dcfff   
    color7                  #a9b1d6   
    color8                  #414868   
    color9                  #f7768e   
    cursor                  #c0caf5   
    cursor_text_color       #1a1b26   
    foreground              #c0caf5   
    inactive_tab_background #292e42   
    inactive_tab_foreground #545c7e   
    selection_background    #33467c   
    selection_foreground    #c0caf5   
    url_color               #73daca   

Important environment variables seen by the kitty process:
    PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    LANG                                en_US.UTF-8
    SHELL                               /bin/zsh
    DISPLAY                             :0
    USER                                swim
    XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session1
    XDG_SEAT                            seat0
    XDG_SESSION_DESKTOP                 i3
    XDG_SESSION_TYPE                    x11
    XDG_CURRENT_DESKTOP                 i3
    XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
    XDG_SESSION_CLASS                   user
    XDG_VTNR                            1
    XDG_SESSION_ID                      2
    XDG_RUNTIME_DIR                     /run/user/1000

Additional context Yes, it happens even with kitty --config NONE.

kovidgoyal commented 1 year ago

dup of #6254