No description
| .gitignore | ||
| filewatch.go | ||
| LICENSE.md | ||
| README.md | ||
Filewatch
Automatically execute command when file is modified
Description
Filewatch listens to all files with a filename that matches a regular expression. It spawns a new goroutine for each file it listens to. Each goroutine loops every second and executes a command if the file is modified.
Installing
- Install Go
git clone git.nikobojs.com/nikobojs/filewatchgo build filewatch.go
Run program
- First argument is the regular expression
- The rest of the arguments will be executed when files are modified
- Keyword
{fname}can be used for injecting filename into the command - usage:
./filewatch [regex] [command] - example:
./filewatch '.+\\.go' go fmt {fname}
License
This project is licensed under the MIT License - see the LICENSE.md file for details