Rewrite of John Hawthorn's excellent fzy in Zig.
See Usage for notable differences from the original.
This repo is experimental and its primary purpose is for experimentation and/or fun. Please abandon any expectations of this being a serious project.
Zig 0.11.0 is required. To clone and build, run:
$ git clone https://git.sr.ht/~gpanders/fzy.zig
$ cd fzy.zig
$ zig buildThis will build an fzy binary in zig-out/bin/. To install to a different
prefix, use the -p flag:
$ zig build -p ~/.localBy default, fzy.zig is built in Debug mode. This is very slow. If you
intend to actually use fzy, you should compile in either ReleaseSafe or
ReleaseFast mode:
$ zig build -Doptimize=ReleaseSafeUsage is the same as the original fzy except for the following:
-
Input is read concurrently with key events from the user. This means you can start typing your query right away rather than waiting for fzy to read the entire candidate list. This is especially noticeable when the input stream is slow.
-
Multi-select support: press
Ctrl-Tto select multiple items. -
A
-f/--fileflag allows you to read input from a file:fzy -f input.txtThis can of course also be done by just piping the file in over stdin:
fzy < input.txt -
A
-n/--no-sortflag that preventsfzyfrom sorting matches.
Questions, bugs, and patches can be sent to the mailing list.