[RFC] choose-files kitten
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.
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.
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 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
Assuming you are running kitty nightly that should work, and does, for me.
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)
It works fine in docker and ssh but you have to run it from the prompt instead of via a keybinding.
released in version 0.45.0