tui-fuzzy-finder
is a fzf style text UI fuzzy finder library in Swift. It lists the contents
of a asynchronous stream in the terminal, one item per line. The user can select one or multiple
items from the list and use fuzzy search to filter the list, and when they press return,
tui-fuzzy-finder
returns the list of the selected items.
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.
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 is available at the Swift Package Index.
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
- Sufficient coverage of
fzf
features. - Fast enough.
- Good platform coverage. PRs are welcome where it falls short.
- Replacing
fzf
as a shell tool. - Supporting the
fzf
features that only make sense in the shell scripting context.