Television: Fast general purpose fuzzy finder TUI
github.com
github.com
I may give this a try and see how it compares to fzf.
No shade against this project (or rust in general) though, it looks very nice and I wanna try it out.
I love this way to find something out of the box, after telescope I never more use the file explorer.
I use fzf to hack together custom TUIs (a calculator, clipboard search, quick LLM chat). The killer feature for me is `--bind` to bind keys and events to custom actions.
It looks like an fzf alternative?
- Batteries-included experience: tv is designed to work out of the box, with minimal setup.
- Smart shell integration: Autocomplete intelligently selects the right source for you.
- Interactive data source switching: You can change the data source on the fly without exiting the application.
- Centralized configuration: All settings are managed in one place, eliminating the need for custom shell scripts.
- Transitions feature: Enables interactive piping of results through multiple steps (e.g., git-repos > files > textual content in files).
- Built-in syntax-highlighted previews: More robust and integrated compared to configuring something like fzf --preview 'bat -n --color=always {0}'.
That said, tv is still an early-stage project (while fzf has been evolving for over 11 years). I’m also planning to draw inspiration from some of fzf’s excellent features in the future.
From the README:
> is designed to be easily extensible
Can you elaborate a little on that?
- Custom Cable Channels: You’re not limited to the built-in channels. You can create your own "cable channels"—essentially custom data sources—by tweaking a simple config file. As the project grows, the vision is for users to contribute their own channel recipes to the wiki, making it easy for others to pick and choose what suits their needs.
- Smart Shell Integration: Television integrates seamlessly with your shell, offering features like smart autocomplete and interactive piping of results. It’s also fully customizable, so you can tweak the smart autocomplete behavior or other features to match your workflow.
- Coming Soon: User-definable custom actions within cable channel recipes for an even more streamlined and tailored experience.
This probably doesn’t answer everything, but I’d be happy to dive into more details about any of the points above! :-)
The preview window in tv is designed to compute its content asynchronously. This approach ensures smooth input handling and maintains overall UI responsiveness. You can test this yourself by using a custom preview command that simulates a delay, like so:
tv --preview "sleep 1 && echo 'the preview'"
You'll notice that even with a delay, the UI remains responsive and doesn't block.That said, I'm sure there's always room for improvement, and I'd be happy to hear your thoughts or suggestions if you're open to discussing it further.
This is primarily a matter of which tradeoff suits most users I guess :-)
Maybe your preview is async but it feels like it is updated for almost every item while I scroll through the list. Fzf preview is debounced and updates after selection stops.
Also when I test it in a dir with a 100 MB text file fzf will become slightly less smooth when scrolling selection, kind of like tv. However in that dir "tv text" will completely fail and not find any string in that file.