From 0e371d1c569ec4f0694bc1a7d9c0728ccace413e Mon Sep 17 00:00:00 2001 From: Matt Green Date: Sun, 5 Feb 2017 13:29:38 -0500 Subject: [PATCH] Update docs for 1.7.0 --- README.md | 4 ++++ doc/watchexec.1 | 27 ++++++++++++++++++++++----- doc/watchexec.1.html | 18 ++++++++++++------ doc/watchexec.1.ronn | 19 +++++++++++++------ 4 files changed, 51 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4fda81d9..436f97b0 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,10 @@ Run `make` when any file changes, using the `.gitignore` file in the current dir $ watchexec make +Run `make` when any file in `lib` or `src` changes: + + $ watchexec -w lib -w src make + ##Installation ###Cargo diff --git a/doc/watchexec.1 b/doc/watchexec.1 index 1450ca15..ac2c7eb5 100644 --- a/doc/watchexec.1 +++ b/doc/watchexec.1 @@ -1,13 +1,13 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "WATCHEXEC" "1" "December 2016" "" "" +.TH "WATCHEXEC" "1" "February 2017" "" "" . .SH "NAME" \fBwatchexec\fR \- execute commands when watched files change . .SH "SYNOPSIS" -watchexec [\fB\-\-exts\fR | \fB\-e\fR \fIextensions\fR]\.\.\. [\fB\-\-filter\fR | \fB\-f\fR \fIpattern\fR]\.\.\. [\fB\-\-ignore\fR | \fB\-i\fR \fIpattern\fR]\.\.\. [\fB\-\-restart\fR | \fB\-r\fR] [\fB\-\-clear\fR | \fB\-c\fR] [\fB\-\-postpone\fR | \fB\-p\fR] [\fB\-\-force\-poll\fR \fIinterval\fR] [\fB\-\-debug\fR | \fB\-d\fR] [\fB\-\-no\-vcs\-ignore\fR] \fIcmd\fR [\fIargument\fR\.\.\.] +watchexec [\fB\-\-exts\fR | \fB\-e\fR \fIextensions\fR]\.\.\. [\fB\-\-filter\fR | \fB\-f\fR \fIpattern\fR]\.\.\. [\fB\-\-ignore\fR | \fB\-i\fR \fIpattern\fR]\.\.\. [\fB\-\-watch\fR | \fB\-w\fR \fIpath\fR]\.\.\. [\fB\-\-restart\fR | \fB\-r\fR] [\fB\-\-clear\fR | \fB\-c\fR] [\fB\-\-postpone\fR | \fB\-p\fR] [\fB\-\-force\-poll\fR \fIinterval\fR] [\fB\-\-debug\fR | \fB\-d\fR] [\fB\-\-no\-vcs\-ignore\fR] \fIcommand\fR [\fIargument\fR\.\.\.] . .SH "DESCRIPTION" Recursively monitors the current directory for changes, executing the command when a filesystem change is detected\. By default, watchexec uses efficient kernel\-level mechanisms to watch for changes\. @@ -18,8 +18,8 @@ At startup, the specified \fIcommand\fR (passing any supplied \fIargument\fRs) i .SH "OPTIONS" . .TP -\fIcmd\fR -Command to run when watched files are modified, and at startup, unless \fB\-\-postpone\fR is specified\. All \fIargument\fRs are passed to \fIcmd\fR\. +\fIcommand\fR +Command to run when watched files are modified, and at startup, unless \fB\-\-postpone\fR is specified\. All \fIargument\fRs are passed to \fIcommand\fR\. . .TP \fB\-e\fR, \fB\-\-exts\fR \fIextensions\fR @@ -38,6 +38,10 @@ Send \fBSIGKILL\fR to the child process group instead of \fBSIGTERM\fR\. Ignores modifications from paths that match \fIpattern\fR\. This option can be specified multiple times, and a match on any pattern causes the path to be ignored\. . .TP +\fB\-w\fR, \fB\-\-watch\fR \fIpath\fR +Monitor a specific path for changes\. By default, the current working directory is watched\. This may be specified multiple times, where a change in any watched directory (and subdirectories) causes \fIcommand\fR to be executed\. +. +.TP \fB\-r\fR, \fB\-\-restart\fR Terminates the child process group if it is still running when subsequent file modifications are detected\. By default, sends \fBSIGTERM\fR; use \fB\-\-kill\fR to send \fBSIGKILL\fR\. . @@ -104,7 +108,7 @@ $ watchexec \-c make test .IP "" 0 . .P -Launch and restart a node\.js server +Launch and restart a node\.js server: . .IP "" 4 . @@ -115,4 +119,17 @@ $ watchexec \-r node app\.js .fi . .IP "" 0 +. +.P +Watch lib and src directories for changes, rebuilding each time: +. +.IP "" 4 +. +.nf + +$ watchexec \-w lib \-w src make +. +.fi +. +.IP "" 0 diff --git a/doc/watchexec.1.html b/doc/watchexec.1.html index e077623f..ed03541c 100644 --- a/doc/watchexec.1.html +++ b/doc/watchexec.1.html @@ -74,7 +74,7 @@

SYNOPSIS

-

watchexec [--exts | -e extensions]... [--filter | -f pattern]... [--ignore | -i pattern]... [--restart | -r] [--clear | -c] [--postpone | -p] [--force-poll interval] [--debug | -d] [--no-vcs-ignore] cmd [argument...]

+

watchexec [--exts | -e extensions]... [--filter | -f pattern]... [--ignore | -i pattern]... [--watch | -w path]... [--restart | -r] [--clear | -c] [--postpone | -p] [--force-poll interval] [--debug | -d] [--no-vcs-ignore] command [argument...]

DESCRIPTION

@@ -85,11 +85,12 @@

OPTIONS

-
cmd

Command to run when watched files are modified, and at startup, unless --postpone is specified. All arguments are passed to cmd.

+
command

Command to run when watched files are modified, and at startup, unless --postpone is specified. All arguments are passed to command.

-e, --exts extensions

Comma-separated list of file extensions to filter by. Leading dots are allowed (.rs) are allowed. (This is a shorthand for -f).

-
-f, --filter pattern

Ignores modifications from paths that do not match pattern. This option can be specified multiple times, where a match on any given pattern causes the path to trigger command.

+
-f, --filter pattern

Ignores modifications from paths that do not match pattern. This option can be specified multiple times, where a match on any given pattern causes the path to trigger command.

-k, --kill

Send SIGKILL to the child process group instead of SIGTERM.

-
-i, --ignore pattern

Ignores modifications from paths that match pattern. This option can be specified multiple times, and a match on any pattern causes the path to be ignored.

+
-i, --ignore pattern

Ignores modifications from paths that match pattern. This option can be specified multiple times, and a match on any pattern causes the path to be ignored.

+
-w, --watch path

Monitor a specific path for changes. By default, the current working directory is watched. This may be specified multiple times, where a change in any watched directory (and subdirectories) causes command to be executed.

-r, --restart

Terminates the child process group if it is still running when subsequent file modifications are detected. By default, sends SIGTERM; use --kill to send SIGKILL.

-c, --clear

Clears the screen before executing command.

-p, --postpone

Postpone execution of command until the first file modification is detected.

@@ -120,15 +121,20 @@
$ watchexec -c make test
 
-

Launch and restart a node.js server

+

Launch and restart a node.js server:

$ watchexec -r node app.js
 
+

Watch lib and src directories for changes, rebuilding each time:

+ +
$ watchexec -w lib -w src make
+
+
  1. -
  2. December 2016
  3. +
  4. February 2017
  5. watchexec(1)
diff --git a/doc/watchexec.1.ronn b/doc/watchexec.1.ronn index 48dc3096..4fa6cc0a 100644 --- a/doc/watchexec.1.ronn +++ b/doc/watchexec.1.ronn @@ -3,7 +3,7 @@ watchexec(1) -- execute commands when watched files change ## SYNOPSIS -watchexec [`--exts` | `-e` ]... [`--filter` | `-f` ]... [`--ignore` | `-i` ]... [`--restart` | `-r`] [`--clear` | `-c`] [`--postpone` | `-p`] [`--force-poll` ] [`--debug` | `-d`] [`--no-vcs-ignore`] [...] +watchexec [`--exts` | `-e` ]... [`--filter` | `-f` ]... [`--ignore` | `-i` ]... [`--watch` | `-w` ]... [`--restart` | `-r`] [`--clear` | `-c`] [`--postpone` | `-p`] [`--force-poll` ] [`--debug` | `-d`] [`--no-vcs-ignore`] [...] ## DESCRIPTION @@ -13,21 +13,24 @@ At startup, the specified (passing any supplied s) is run on ## OPTIONS -* : -Command to run when watched files are modified, and at startup, unless `--postpone` is specified. All s are passed to . +* : +Command to run when watched files are modified, and at startup, unless `--postpone` is specified. All s are passed to . * `-e`, `--exts` : Comma-separated list of file extensions to filter by. Leading dots are allowed (.rs) are allowed. (This is a shorthand for `-f`). * `-f`, `--filter` : -Ignores modifications from paths that do not match . This option can be specified multiple times, where a match on any given pattern causes the path to trigger *command*. +Ignores modifications from paths that do not match . This option can be specified multiple times, where a match on any given pattern causes the path to trigger . * `-k`, `--kill`: Send `SIGKILL` to the child process group instead of `SIGTERM`. -* `-i`, `--ignore` *pattern*: +* `-i`, `--ignore` : Ignores modifications from paths that match . This option can be specified multiple times, and a match on any pattern causes the path to be ignored. +* `-w`, `--watch` : +Monitor a specific path for changes. By default, the current working directory is watched. This may be specified multiple times, where a change in any watched directory (and subdirectories) causes to be executed. + * `-r`, `--restart`: Terminates the child process group if it is still running when subsequent file modifications are detected. By default, sends `SIGTERM`; use `--kill` to send `SIGKILL`. @@ -64,7 +67,11 @@ Run tests when source files change, clearing the screen each time: $ watchexec -c make test -Launch and restart a node.js server +Launch and restart a node.js server: $ watchexec -r node app.js +Watch lib and src directories for changes, rebuilding each time: + + $ watchexec -w lib -w src make +