diff --git a/doc/watchexec.1 b/doc/watchexec.1 index c3ea3ea..af954f0 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" "March 2022" "" "" +.TH "WATCHEXEC" "1" "April 2022" "" "" . .SH "NAME" \fBwatchexec\fR \- execute commands when watched files change @@ -146,6 +146,21 @@ Print the version of watchexec\. \fB\-h\fR, \fB\-\-help\fR Print a help message\. . +.SH "PATHS" +By default, Watchexec watches the current directory\. This can be changed with the \fB\-\-watch\fR option, which can be passed multiple times\. +. +.P +Upon starting, Watchexec resolves a "project origin" from the watched paths\. To do so, it recurses up every parent directory from each watched path, looking for file and directory patterns which indicate a project origin among many different software systems, such as a Git repo, Cargo crate, licensing files, readmes, workspace configuration, etc\. For the full current list, consult the source at \fBlib/src/project\.rs\fR\. +. +.P +Once it has a list of "potential project origins", it resolves the common prefix they all have, and uses this as the overall project origin\. Note that the home directory is excluded from potential origins unless it\'s explicitly requested as a watched path\. +. +.P +The overall project origin is used to find and resolve ignore files, such that in most cases it acts as one would expect for a tool that runs anywhere inside a project\. +. +.P +For this reason, it is not recommended to use Watchexec for watching disparate folders in a filesystem, where those would resolve to a too\-broad project origin\. +. .SH "ENVIRONMENT" In variables that contain lists of paths, the separator is as for the \fB$PATH\fR environment variable (a colon, or semicolon on Windows)\. . diff --git a/doc/watchexec.1.html b/doc/watchexec.1.html index b11ead1..62f740d 100644 --- a/doc/watchexec.1.html +++ b/doc/watchexec.1.html @@ -63,6 +63,7 @@ SYNOPSIS DESCRIPTION OPTIONS + PATHS ENVIRONMENT FILES EXAMPLES @@ -148,6 +149,18 @@ +

PATHS

+ +

By default, Watchexec watches the current directory. This can be changed with the --watch option, which can be passed multiple times.

+ +

Upon starting, Watchexec resolves a "project origin" from the watched paths. To do so, it recurses up every parent directory from each watched path, looking for file and directory patterns which indicate a project origin among many different software systems, such as a Git repo, Cargo crate, licensing files, readmes, workspace configuration, etc. For the full current list, consult the source at lib/src/project.rs.

+ +

Once it has a list of "potential project origins", it resolves the common prefix they all have, and uses this as the overall project origin. Note that the home directory is excluded from potential origins unless it's explicitly requested as a watched path.

+ +

The overall project origin is used to find and resolve ignore files, such that in most cases it acts as one would expect for a tool that runs anywhere inside a project.

+ +

For this reason, it is not recommended to use Watchexec for watching disparate folders in a filesystem, where those would resolve to a too-broad project origin.

+

ENVIRONMENT

In variables that contain lists of paths, the separator is as for the $PATH environment variable (a colon, or semicolon on Windows).

@@ -267,7 +280,7 @@
  1. -
  2. March 2022
  3. +
  4. April 2022
  5. watchexec(1)
diff --git a/doc/watchexec.1.ronn b/doc/watchexec.1.ronn index 98f35a6..f1f9fbf 100644 --- a/doc/watchexec.1.ronn +++ b/doc/watchexec.1.ronn @@ -108,6 +108,18 @@ Print the version of watchexec. * `-h`, `--help`: Print a help message. +## PATHS + +By default, Watchexec watches the current directory. This can be changed with the `--watch` option, which can be passed multiple times. + +Upon starting, Watchexec resolves a "project origin" from the watched paths. To do so, it recurses up every parent directory from each watched path, looking for file and directory patterns which indicate a project origin among many different software systems, such as a Git repo, Cargo crate, licensing files, readmes, workspace configuration, etc. For the full current list, consult the source at `lib/src/project.rs`. + +Once it has a list of "potential project origins", it resolves the common prefix they all have, and uses this as the overall project origin. Note that the home directory is excluded from potential origins unless it's explicitly requested as a watched path. + +The overall project origin is used to find and resolve ignore files, such that in most cases it acts as one would expect for a tool that runs anywhere inside a project. + +For this reason, it is not recommended to use Watchexec for watching disparate folders in a filesystem, where those would resolve to a too-broad project origin. + ## ENVIRONMENT In variables that contain lists of paths, the separator is as for the `$PATH` environment variable (a colon, or semicolon on Windows).