kovidgoyal / kitty

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

Upgraded Kitty to 0.34.1 - hints kitten with regex target not working #7366

Closed cwaldbieser closed 3 weeks ago

cwaldbieser commented 3 weeks ago

Describe the bug I have the following custom mapping in my kitty config: # Select an image file with the hints kitten and open it in an overlay window. map ctrl+shift+p>i kitten hints --program "launch --type=overlay kitty +kitten icat --hold" --type regex --regex "(?i)\S+[.](?:jpg|jpeg|gif|png|tiff|bmp)" It allows me to CTRL+SHIFT+p then i - selects any image file on the terminal and opens the image with the icat kitten in an overlay window.

However, after upgrading to kitty 0.34.1, despite having several .jog files on the terminal screen, the CTRL+SHIFT+p > i sequence elicits:

Error: No matches found

To Reproduce Steps to reproduce the behavior:

  1. add the above mapping to a kitty config
  2. cd to a folder with images
  3. press the command mapping CTRL+SHIFT+p > i
  4. Error message is displayed

Environment details

kitty 0.34.1 (7f61f1f9f3) created by Kovid Goyal
Linux waldbiec-Latitude-7430 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
Ubuntu 22.04.4 LTS waldbiec-Latitude-7430 /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
Running under: X11
Frozen: True
Paths:
  kitty: /home/waldbiec/.local/kitty.app/bin/kitty
  base dir: /home/waldbiec/.local/kitty.app/lib/kitty
  extensions dir: /home/waldbiec/.local/kitty.app/lib/kitty-extensions
  system shell: /bin/bash
Loaded config files:
  /home/waldbiec/.config/kitty/kitty.conf

Config options different from defaults:
cursor_text_color          None
dynamic_background_opacity True
editor                     /usr/local/bin/nvim
font_family                Fira Code
font_size                  14.0
selection_foreground       None
Added shortcuts:
    ctrl+down →  resize_window shorter 3
    ctrl+home →  resize_window reset
    ctrl+left →  resize_window narrower
    ctrl+right →  resize_window wider
    ctrl+up →  resize_window taller
Changed shortcuts:
    kitty_mod+p > f →  kitten hints --type regex --regex "(?s)'([^'\n]+)'" --program @, kitten hints --type regex --regex '(?s)"([^"\n]+)"' --program @, kitten hints --type url --program @, kitten hints --type hyperlink --program @, kitten hints --type hash --program @, kitten hints --type word --program @, kitten hints --type line --program @, kitten hints --type path --program @, kitten hints --program "launch --type=overlay kitty +kitten icat --hold" --type regex --regex "(?i)\S+[.](?:jpg|jpeg|gif|png|tiff|bmp)", kitten hints --type hyperlink, kitten hints --type linenum, kitten hints --type hash --program -, kitten hints --type word --program -, kitten hints --type line --program -, kitten hints --type path --program -
Colors:
    background                 #011627   
    color0                     #011627   
    color1                     #ef5350   
    color10                    #22da6e   
    color11                    #ffeb95   
    color12                    #82aaff   
    color13                    #c792ea   
    color14                    #7fdbca   
    color2                     #22da6e   
    color3                     #addb67   
    color4                     #82aaff   
    color5                     #c792ea   
    color6                     #21c7a8   
    color7                     #ffffff   
    color8                     #575656   
    color9                     #ef5350   
    cursor                     #80a4c2   
    foreground                 #d6deeb   
    selection_background       #1d3b53   

Important environment variables seen by the kitty process:
    PATH                                /home/waldbiec/.pyenv/shims:/home/waldbiec/.nvm/versions/node/v20.10.0/bin:/home/waldbiec/.pyenv/plugins/pyenv-virtualenv/shims:/home/waldbiec/.pyenv/bin:/home/waldbiec/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/waldbiec/.local/bin:/home/waldbiec/.local/bin:/home/waldbiec/.cargo/bin
    LANG                                en_US.UTF-8
    VISUAL                              /usr/local/bin/nvim
    EDITOR                              /usr/local/bin/nvim
    SHELL                               /bin/bash
    DISPLAY                             :0
    USER                                waldbiec
    XDG_SESSION_TYPE                    x11
    XDG_SESSION_CLASS                   user
    XDG_MENU_PREFIX                     gnome-
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_CURRENT_DESKTOP                 ubuntu:GNOME
    XDG_SESSION_DESKTOP                 ubuntu-xorg
    XDG_CONFIG_DIRS                     /etc/xdg/xdg-ubuntu-xorg:/etc/xdg
    XDG_DATA_DIRS                       /usr/share/ubuntu-xorg:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
kovidgoyal commented 3 weeks ago

upgrading from what version?

cwaldbieser commented 3 weeks ago

I want to say 0.29.something ... I believe I got 2 upgrade notices I put off before upgrading today. Is there some way to check if I just installed right over the previous install?

cwaldbieser commented 3 weeks ago

The last issue I opened was #6315 on May 30, 2023. Looks like the next release after that was 0.29.0, which I believe was the last release I installed.

kovidgoyal commented 3 weeks ago

The parsing of map has changed to accommodate advanced keyboard modes, you need to double up the backslash in your pattern.