kovidgoyal / kitty

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

"kitty +update-kitty" is not a known entry point #6729

Closed screendriver closed 11 months ago

screendriver commented 11 months ago

Describe the bug

I'm using the ssh kitten to login to my remote machines. There I wanted to try out the relatively new transfer files kitten. Unfortunately I get the error message

$ kitten transfer
Error: transfer is not a known subcommand for kitten. Use --help to get a list of valid subcommands.

After checking for the installed kitten version on the remote host I saw that this version is pretty outdated (on my local machine I have 0.30.1):

$ kitten --version
kitten 0.29.2 created by Kovid Goyal

So I want to update it. According to the docs I should be able to do that with a simple kitty +update-kitty. Unfortunately this does not work. I'm getting following error message:

$ kitty +update-kitty
kitty needs to be installed

Downloading kitty from: https://github.com/kovidgoyal/kitty/releases/download/v0.30.1/kitty-0.30.1-arm64.txz

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17.5M  100 17.5M    0     0  4425k      0  0:00:04  0:00:04 --:--:-- 5000k
update-kitty is not a known entry point. Choices are: icat, list-fonts, hold, complete, runpy, launch, open, kitten, edit-config, shebang, edit

The only solution that worked was to completely remove the directory /home/me/.local/share/kitty-ssh-kitten/ and re-login to the remote machine.

Two questions two this:

  1. Why is kitty +update-kitty not kown?
  2. Wouldn't it possible that kitty does this kind of update automatically on the remote machine when I login with the ssh kitten and it sees by itself that the local version is outdated?

To Reproduce Steps to reproduce the behavior:

  1. ssh into a remote machine: kitten ssh my@machine
  2. check the kitten version on the remote host: kitten --version. On my remote machine is shows kitten 0.29.2 created by Kovid Goyal which is pretty old and I want to update it
  3. try to update kitty on the remote host: kitty +update-kitty
  4. update-kitty is not a known entry point. Choices are: icat, list-fonts, hold, complete, runpy, launch, open, kitten, edit-config, shebang, edit

Screenshots

Environment details

kitty 0.30.1 (6a3529b7c2) created by Kovid Goyal
Darwin MacBook-Pro.fritz.box 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64
ProductName:        macOS ProductVersion:       14.0 BuildVersion:      23A344
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config files:
  /Users/me/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control          yes
bold_font                     JetBrainsMono Nerd Font Bold
bold_italic_font              JetBrainsMono Nerd Font Bold Italic
confirm_os_window_close       1
copy_on_select                clipboard
cursor_text_color             None
enable_audio_bell             False
font_family                   JetBrainsMono Nerd Font Regular
font_size                     13.0
italic_font                   JetBrainsMono Nerd Font Italic
listen_on                     unix:$TMPDIR/kitty
macos_show_window_title_in    window
macos_titlebar_color          1
modify_font:
    cell_height 120%
mouse_hide_wait               -1.0
scrollback_pager_history_size 10485760
shell_integration             frozenset({'no-cursor'})
tab_activity_symbol           *
tab_bar_style                 powerline
tab_powerline_style           round
update_check_interval         0.0
Added shortcuts:
    cmd+left →  send_text all \x1bOH
    cmd+right →  send_text all \x1bOF
    ctrl+cmd+enter →  launch --cwd=current
    ctrl+cmd+m →  toggle_maximized
    ctrl+h →  kitten pass_keys.py neighboring_window left   ctrl+h
    ctrl+j →  kitten pass_keys.py neighboring_window bottom ctrl+j
    ctrl+k →  kitten pass_keys.py neighboring_window top    ctrl+k
    ctrl+l →  kitten pass_keys.py neighboring_window right  ctrl+l
    kitty_mod+m →  toggle_layout stack
    opt+left →  send_text all \x1B\x62
    opt+right →  send_text all \x1B\x66
    shift+down →  move_window down
    shift+left →  move_window left
    shift+right →  move_window right
    shift+up →  move_window up
Changed shortcuts:
    kitty_mod+` →  change_font_size all +2.0
    kitty_mod+c →  previous_window
    kitty_mod+p > h →  kitten hints --type hash --program @
    kitty_mod+p > n →  kitten hints --type linenum nvim +{line} {path}
Colors:
    active_tab_background         #f8f8f2   
    active_tab_foreground         #282a36   
    background                    #282a36   
    color0                        #21222c   
    color1                        #ff5555   
    color10                       #69ff94   
    color11                       #ffffa5   
    color12                       #d6acff   
    color13                       #ff92df   
    color14                       #a4ffff   
    color2                        #50fa7b   
    color3                        #f1fa8c   
    color4                        #bd93f9   
    color5                        #ff79c6   
    color6                        #8be9fd   
    color7                        #f8f8f2   
    color8                        #6272a4   
    color9                        #ff6e6e   
    cursor                        #f8f8f2   
    foreground                    #f8f8f2   
    inactive_tab_background       #6272a4   
    inactive_tab_foreground       #282a36   
    mark1_background              #ff5555   
    mark1_foreground              #282a36   
    selection_background          #44475a   
    selection_foreground          #ffffff   
    url_color                     #8be9fd   

Important environment variables seen by the kitty process:
    PATH                                /opt/homebrew/bin:/usr/local/bin:/var/folders/85/8rb_y49j5911bg5qzd7tkddw0000gp/T/fnm_multishell_19222_1612159369334/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/kitty.app/Contents/MacOS
    LANG                                en_US.UTF-8
    SHELL                               /bin/zsh
    USER                                me

Additional context

kovidgoyal commented 11 months ago

The docs are outdated. You need

kitten update-self

and no I dont want to do automatic updates, am not a fan of those. If and when you have an issue or want to try new functionality, its just a simple command to update it.

screendriver commented 11 months ago

kitten update-self

Gives me: Error: This is not a standalone kitten executable. You must update all of kitty instead.

kovidgoyal commented 11 months ago

Yes because you have kitty installed from before. Delete/uninstall it and you will be fine. You dont need all of kitty anymore since almost all kittens have now been ported to the kitten binary.

screendriver commented 11 months ago

Unfortunately not:

$ where kitty
kitty not found
$ where kitten
kitten not found
$ exit

Then I login again:

$ kitten ssh my@machine
$ where kitty 
/home/me/.local/share/kitty-ssh-kitten/kitty/bin/kitty
$ where kitten
/home/me/.local/share/kitty-ssh-kitten/kitty/bin/kitten
$ kitten update-self
kitten needs to be installed

Downloading kitten from: https://github.com/kovidgoyal/kitty/releases/latest/download/kitten-linux-amd64

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 14.1M  100 14.1M    0     0  23.2M      0 --:--:-- --:--:-- --:--:-- 23.2M
Error: This is not a standalone kitten executable. You must update all of kitty instead.
kovidgoyal commented 11 months ago

That's probably a spurious error, what does

kitten --version say after updating?

screendriver commented 11 months ago

kitten --version say after updating?

kitten 0.30.1 created by Kovid Goyal

kovidgoyal commented 11 months ago

Yeah that means it updated. I'll fix the spurious error message.

screendriver commented 11 months ago

Ah! 💡 That makes sense. So yeah an info message with a proper exit code in this situation would be nice 👍