Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 780 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 780 Bytes

👀 watch-files

watch-files is a basic file system watcher to execute a command upon file changes.

Install

To install the binary, run:

cargo install watch-files

Usage

  <files> | watch-files "<command>"
  <files> | watch-files [-p <poll_time_in_ms>] "<command>"
  watch-files -h|--help

Examples

The following will watch all files in the src directory, and run cargo build when a file changes.

find src/* | watch-files "cargo build"

The following will watch all files in the src directory every 1000 milliseconds, and run cargo build when a file change is detected.

find src/* | watch-files --poll-rate 1000 "cargo build"

The following will print the help text

watch-files --help