-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b07240d
commit d449b73
Showing
1 changed file
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
# rentr | ||
A utility for running arbitrary commands when files change. | ||
## Program Description | ||
|
||
## Installation | ||
`cargo install rentr` | ||
This program is a utility for running arbitrary commands when files change. It is written in Rust and is similar to the `entr` tool. | ||
|
||
The program takes a list of paths to watch for changes from stdin. When any of the watched files are modified, the program executes a provided command. | ||
|
||
The program supports the following options: | ||
|
||
- `-c` or `--clear`: Clears the screen before running the command. | ||
- `-r` or `--reset`: Reloads a persistent child process. | ||
|
||
The program uses the `notify` crate to watch for file changes and the `structopt` crate for command line argument parsing. | ||
|
||
## Usage | ||
|
||
To use the program, you can pipe a list of paths to watch from stdin and provide a command to execute when the files change. For example: | ||
|
||
``` | ||
echo "my-folder" | rentr -c -r echo "my-folder has changed" | ||
``` | ||
|
||
This will watch the `my-folder` directory for changes and execute the command `echo "my-folder has changed"` whenever a change occurs. | ||
|
||
`find . | grep \.rs | rentr -c cargo build` | ||
`find . | grep \.rs | rentr -c echo "CHANGED"` | ||
`find . | grep \.rs | rentr -c echo "CHANGED" |