wtf is a minimal and lightweight fuzzy finder for the terminal, designed to be a simpler alternative to tools like, for example, fzf.
It performs fast incremental filtering and sorting of input lines using my own fuzzy matching algorithm
and Levenshtein distance, and displays results in an interactive TUI list.
-
Interactive terminal UI based on termbox2
-
Case-insensitive fuzzy matching
-
Scrollable, selectable list of matches
-
Minimal memory usage
-
Ideal for piping input and quickly selecting an entry
rm -i `ls | wtf`or
`ls /bin | wtf`- Input: Takes lines from stdin (piped input).
- Output: Prints the selected line to stdout.
- Controls:
- Type to filter results
- Arrow keys to navigate matches
- Enter to select
- Esc to quit without selection
- Supports Emacs-style keybindings (Only Ctrl-A and Ctrl-E for now)
Requires Make and any (I think) C compiler.
makeYou can modify config.h to customize TUI colors and behavior.
-
Reads all input lines into memory at startup.
-
Implements fuzzy matching with Levenshtein distance and a simple scoring algorithm tracking character matches and their order.
-
Uses termbox2 for terminal UI handling and rendering.
-
Incrementally filters and sorts the list based on query string with live updates.
- Maybeeee add command-line options for customization.