diff --git a/doc/watchexec.1 b/doc/watchexec.1 index d5e28f8..e50aeae 100644 --- a/doc/watchexec.1 +++ b/doc/watchexec.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "WATCHEXEC" "1" "April 2017" "" "" +.TH "WATCHEXEC" "1" "August 2018" "" "" . .SH "NAME" \fBwatchexec\fR \- execute commands when watched files change @@ -71,10 +71,38 @@ Skip loading of version control system (VCS) ignore files\. By default, watchexe . .TP \fB\-\-no\-default\-ignore\fR -Skip default ignore statements\. By default, watchexec ignores common temporary files for you, for example \fB.*\.swp\fR, \fB*\.pyc\fR, and \fB\.DS_Store\fR +Skip default ignore statements\. By default, watchexec ignores common temporary files for you, for example \fB*\.swp\fR, \fB*\.pyc\fR, and \fB\.DS_Store\fR\. . .SH "ENVIRONMENT" -Processes started by watchexec have the \fB$WATCHEXEC_UPDATED_PATH\fR environment variable set to the path of the first modification observed\. In addition, the \fB$WATCHEXEC_COMMON_PATH\fR environment variable is set to the common path of all observed modifications\. +Processes started by watchexec have environment variables set describing the modification(s) observed\. Which variable is set depends on how many modifications were observed and/or what type they were\. +. +.P +If a single file changed (depending on the event type): +. +.IP "\(bu" 4 +\fB$WATCHEXEC_CREATED_PATH\fR, the path of the file that was created +. +.IP "\(bu" 4 +\fB$WATCHEXEC_REMOVED_PATH\fR, the path of the file that was removed +. +.IP "\(bu" 4 +\fB$WATCHEXEC_RENAMED_PATH\fR, the path of the file that was renamed +. +.IP "\(bu" 4 +\fB$WATCHEXEC_WRITTEN_PATH\fR, the path of the file that was modified +. +.IP "\(bu" 4 +\fB$WATCHEXEC_META_CHANGED_PATH\fR, the path of the file whose metadata changed +. +.IP "" 0 +. +.P +If multiple files changed: +. +.IP "\(bu" 4 +\fB$WATCHEXEC_COMMON_PATH\fR, the longest common path of all of the files that triggered a change +. +.IP "" 0 . .SH "EXAMPLES" Rebuild a project when source files change: diff --git a/doc/watchexec.1.html b/doc/watchexec.1.html index 6b084c8..fcd80b4 100644 --- a/doc/watchexec.1.html +++ b/doc/watchexec.1.html @@ -98,13 +98,31 @@
-d, --debug

Prints diagnostic messages to STDERR

--force-poll interval

Poll for changes every interval ms instead of using system-specific notification mechanisms (such as inotify). This is useful when you are monitoring NFS shares.

--no-vcs-ignore

Skip loading of version control system (VCS) ignore files. By default, watchexec loads .gitignore files in the current directory (or parent directories) and uses them to populate the ignore list.

-
--no-default-ignore

Skip default ignore statements. By default, watchexec ignores common temporary files for you, for example *.swp, *.pyc, and .DS_Store

+
--no-default-ignore

Skip default ignore statements. By default, watchexec ignores common temporary files for you, for example *.swp, *.pyc, and .DS_Store.

ENVIRONMENT

-

Processes started by watchexec have the $WATCHEXEC_UPDATED_PATH environment variable set to the path of the first modification observed. In addition, the $WATCHEXEC_COMMON_PATH environment variable is set to the common path of all observed modifications.

+

Processes started by watchexec have environment variables set describing the modification(s) observed. Which variable is set depends on how many modifications were observed and/or what type they were.

+ +

If a single file changed (depending on the event type):

+ + + + +

If multiple files changed:

+ + +

EXAMPLES

@@ -136,7 +154,7 @@
  1. -
  2. April 2017
  3. +
  4. August 2018
  5. watchexec(1)
diff --git a/doc/watchexec.1.ronn b/doc/watchexec.1.ronn index d0d2439..9185452 100644 --- a/doc/watchexec.1.ronn +++ b/doc/watchexec.1.ronn @@ -53,11 +53,23 @@ Poll for changes every ms instead of using system-specific notificati Skip loading of version control system (VCS) ignore files. By default, watchexec loads .gitignore files in the current directory (or parent directories) and uses them to populate the ignore list. * `--no-default-ignore`: -Skip default ignore statements. By default, watchexec ignores common temporary files for you, for example `*.swp`, `*.pyc`, and `.DS_Store` +Skip default ignore statements. By default, watchexec ignores common temporary files for you, for example `*.swp`, `*.pyc`, and `.DS_Store`. ## ENVIRONMENT -Processes started by watchexec have the `$WATCHEXEC_UPDATED_PATH` environment variable set to the path of the first modification observed. In addition, the `$WATCHEXEC_COMMON_PATH` environment variable is set to the common path of all observed modifications. +Processes started by watchexec have environment variables set describing the modification(s) observed. Which variable is set depends on how many modifications were observed and/or what type they were. + +If a single file changed (depending on the event type): + +* `$WATCHEXEC_CREATED_PATH`, the path of the file that was created +* `$WATCHEXEC_REMOVED_PATH`, the path of the file that was removed +* `$WATCHEXEC_RENAMED_PATH`, the path of the file that was renamed +* `$WATCHEXEC_WRITTEN_PATH`, the path of the file that was modified +* `$WATCHEXEC_META_CHANGED_PATH`, the path of the file whose metadata changed + +If multiple files changed: + +* `$WATCHEXEC_COMMON_PATH`, the longest common path of all of the files that triggered a change ## EXAMPLES