juri/tui-fuzzy-finder
`tui-fuzzy-finder` is a [fzf] style text UI fuzzy finder library in Swift. It lists the contents
Demo
[[asciicast]](https://asciinema.org/a/690161)
Why
fzf is a fantastic tool, but if you're not into shell scripting, it can be be a drag. This library aims to provide the core functionality of fzf in a Swift library, so you can write your tools in Swift.
Because tui-fuzzy-finder is in Swift and runs inside your code, you can use use any normal Swift values for the list, as long as they conform to CustomStringConvertible. You can even make them display ANSI escape sequences.
What is included
tui-fuzzy-finder consists of a Swift library and an executable, sfzf, that uses it. The purpose of sfzf is to make it easy to excercise the tui-fuzzy-finder features that are difficult to test automatically. It does not try to compete with fzf.
Documentation
Documentation is available at the Swift Package Index.
Command line usage
To build and install the executable run swift build -c release, then copy .build/release/sfzf somewhere on your path.
Run sfzf --help to get information about command line arguments.
While the program is running:
- Move up and down with arrows
- Edit the filter line with normal line-editing commands
- Toggle selection with tab
- Press return to exit and write the selected lines to stdout
Goals
- Sufficient coverage of
fzffeatures. - Fast enough.
Stretch goals
- Good platform coverage. PRs are welcome where it falls short.
Non-goals
- Replacing
fzfas a shell tool. - Supporting the
fzffeatures that only make sense in the shell scripting context.
[fzf]: https://github.com/junegunn/fzf
Package Metadata
Repository: juri/tui-fuzzy-finder
Default branch: main
README: README.md