Add documentation for --no-shell
This commit is contained in:
parent
ee5e93e6af
commit
ea130dd021
|
@ -58,9 +58,9 @@ Call/restart `my_server` when any file in the current directory (and all subdire
|
|||
|
||||
$ watchexec -r -s SIGKILL my_server
|
||||
|
||||
Send a SIGHUP to the child process upon changes:
|
||||
Send a SIGHUP to the child process upon changes (Note: with using `-n | --no-shell` here, we're executing `my_server` directly, instead of wrapping it in a shell:
|
||||
|
||||
$ watchexec -s SIGHUP my_server
|
||||
$ watchexec -n -s SIGHUP my_server
|
||||
|
||||
Run `make` when any file changes, using the `.gitignore` file in the current directory to filter:
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@ Ignores modifications from paths that do not match \fIpattern\fR\. This option c
|
|||
Sends the specified signal (e\.g\. \fBSIGKILL\fR) to the child process\. Defaults to \fBSIGTERM\fR\.
|
||||
.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-no\-shell\fR
|
||||
Execute command directly, do not use \fBsh -c\fR\. This is especially useful in combination with \fB--signal\fR, as the signal is then send directly to the specified command\. While \fB--no-shell\fR is a little more performant than the default, it prevents using shell-features like pipes and redirects\.
|
||||
.
|
||||
.TP
|
||||
\fB\-i\fR, \fB\-\-ignore\fR \fIpattern\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\.
|
||||
.
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
<dt><code>-e</code>, <code>--exts</code> <var>extensions</var></dt><dd><p>Comma-separated list of file extensions to filter by. Leading dots are allowed (.rs) are allowed. (This is a shorthand for <code>-f</code>).</p></dd>
|
||||
<dt><code>-f</code>, <code>--filter</code> <var>pattern</var></dt><dd><p>Ignores modifications from paths that do not match <var>pattern</var>. This option can be specified multiple times, where a match on any given pattern causes the path to trigger <var>command</var>.</p></dd>
|
||||
<dt><code>-s</code>, <code>--signal</code> <var>SIGNAL</var></dt><dd><p>Sends the specified signal (e.g. <code>SIGKILl</code>) to the child process. Defaults to <code>SIGTERM</code>.</p></dd>
|
||||
<dt><code>-n</code>, <code>--no-shell</code></dt><dd><p>Execute command directly, do not use <CODE>sh -c</code>. This is especially useful in combination with <code>--signal</code>, as the signal is then send directly to the specified command. While <code>--no-shell</code> is a little more performant than the default, it prevents using shell-features like pipes and redirects.</p></dd>
|
||||
<dt><code>-i</code>, <code>--ignore</code> <var>pattern</var></dt><dd><p>Ignores modifications from paths that match <var>pattern</var>. This option can be specified multiple times, and a match on any pattern causes the path to be ignored.</p></dd>
|
||||
<dt><code>-w</code>, <code>--watch</code> <var>path</var></dt><dd><p>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 <var>command</var> to be executed.</p></dd>
|
||||
<dt><code>-r</code>, <code>--restart</code></dt><dd><p>Terminates the child process group if it is still running when subsequent file modifications are detected. By default, sends <code>SIGTERM</code>; use <code>--kill</code> to send <code>SIGKILL</code>.</p></dd>
|
||||
|
|
|
@ -25,6 +25,9 @@ Ignores modifications from paths that do not match <pattern>. This option can be
|
|||
* `-s`, `--signal`:
|
||||
Sends the specified signal (e.g. `SIGKILL`) to the child process. Defaults to `SIGTERM`.
|
||||
|
||||
* `-n`, `--no-shell`:
|
||||
Execute command directly, do not use `sh -c`. This is especially useful in combination with `--signal`, as the signal is then send directly to the specified command. While `--no-shell` is a little more performant than the default, it prevents using shell-features like pipes and redirects.
|
||||
|
||||
* `-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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue