kitty icon indicating copy to clipboard operation
kitty copied to clipboard

[RFC] choose-files kitten

Open kovidgoyal opened this issue 4 months ago • 2 comments

Hi all,

After some months of development, I am happy to announce the choose-files kitten is now ready. This is a kitten that implements fuzzy finding for files, with content previews for text files with syntax highlighting, animated images and videos (needs ffmpeg installed), archives and ebooks (needs calibre >=8.16 installed).

You can easily select files with a few keystrokes and insert them into the shell prompt or other terminal workflow. On Linux, you can even have your non-terminal GUI programs use the kitten as a file open dialog, see desktop-ui for how to do that.

To test it out install a nightly build

Press ctrl+shift+p and then c to insert the selected file at your prompt, or run:

kitten choose-files

Slightly outdated documentation for the kitten is at docs. The TLDR is type a few letters from the file and press enter when your desired file is the topmost match, or use the arrow keys to move around the list of matches. Press Tab to switch into a directory if the topmost match is a directory and shift+tab to go back up a directory level.

Enjoy and report any issues or suggestions for improvements here.

Image

kovidgoyal avatar Dec 02 '25 04:12 kovidgoyal

Hi @kovidgoyal I want to bind it to a keyboard shortcut but I can't figure out the right way to do it. I think would be good if the documentation mentioned how. You showed in the recent interview how you had bound it, I think.

claes avatar Dec 06 '25 11:12 claes

If you mean a global shortcut, see: https://sw.kovidgoyal.net/kitty/kittens/desktop-ui/

If you mean a kitty shortcut, it is already bound by default, as described above

kovidgoyal avatar Dec 06 '25 11:12 kovidgoyal

@kovidgoyal It's an amazing tool, thanks

Is it possible to change the default keybind ctrl+shift+p>c?

When I do that in my config file,

map ctrl+g kitten choose-files --mode=dir

Then it show

This must be run as kitten choose-files

Mister7F avatar Dec 21 '25 13:12 Mister7F

Assuming you are running kitty nightly that should work, and does, for me.

kovidgoyal avatar Dec 21 '25 14:12 kovidgoyal

after an upgrade it worked fine, thanks

one suggestion, it would be nice if it work inside docker and in ssh (that it look for the files inside the docker in not in the host)

Mister7F avatar Dec 21 '25 14:12 Mister7F

It works fine in docker and ssh but you have to run it from the prompt instead of via a keybinding.

kovidgoyal avatar Dec 21 '25 14:12 kovidgoyal

released in version 0.45.0

kovidgoyal avatar Dec 24 '25 06:12 kovidgoyal