a little file event watcher written in zig.
*sorry: currently linux only
zig build --release=fast
cp zig-out/bin/bb ~/.local/bin
(or wherever you want it)
bb <path> "<pattern>" -- <command> [args..]
path
- the path to watch for events, includes all subdirs, uses .gitignore if available, supports relative or absolute paths
pattern
- a simple pattern to filter for specific files, supports simple glob (*) and maybe (?) parameters, e.g. *.zig
or ?prefix_*.zig
, uses .gitignore if available, must be enclosed in quotes
--
to pass the next args to bb
command
- the command you want to run on file events
args...
- any additional args for the command
bb . "*.zig" -- zig build test --summary all
this will cause any changes to *.zig files in the current directory and below to trigger a test build to run
- learning zig/linux stuff
- i needed a file watcher, so i made one
see why?
see LICENSE.md