fsex
Execute [user-specified] command when update(s) detected in file system.
Name stands for "file system events" and "execute".
Usage
For compiled binary
fsex -f <file|directory> [-c] [-f <file2|dir2> ...] command [args ...]
Source script can be invoked with interpreter:
go run fsex.go -f <file|directory> [-c] [-f <file2|dir2> ...] command [args ...]
Motivation
Automated command execution upon changes in file system
is pretty practical thing for certain purposes.
At the time of this repo creation we didn't know about more mature projects doing basically the same, namely:
- watchexec written in RUST, feature rich, no cons
- entr written in C, likely doesn't work on Windows
Admitting superiority of listed competitors, we still make an effort to deliver similar solution in Golang.
TODO
Following improvements are planned:
- Configurable time to trigger command after
- Nicer output
- Quiet options: suppress
fsex
output or command output