mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-28 06:01:34 +02:00
Document --shell
This commit is contained in:
parent
e5cdd51633
commit
6cfe649228
@ -65,7 +65,7 @@ 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 (Note: with using `-n | --no-shell` here, we're executing `my_server` directly, instead of wrapping it in a shell:
|
||||
Send a SIGHUP to the child process upon changes (Note: using `-n` here we're executing `my_server` directly, instead of wrapping it in a shell:
|
||||
|
||||
$ watchexec -n -s SIGHUP my_server
|
||||
|
||||
|
@ -11,7 +11,9 @@ cmd="$words[1]"
|
||||
args=(
|
||||
'(-c --clear)'{-c,--clear}'[Clear screen before executing command]'
|
||||
'(-h --help)'{-h,--help}'[Prints help information]'
|
||||
'(-n --no-shell)'{-n,--no-shell}'[Do not wrap command in ''sh -c'' resp. ''cmd.exe /C'']'
|
||||
'--shell=[Change the wrapping shell, or `none` to disable]'
|
||||
'--no-shell[Deprecated, use --shell=none]'
|
||||
'-n[Shorthand for --shell=none]'
|
||||
'--no-environment[Do not set WATCHEXEC_*_PATH environment variables for child process]'
|
||||
'--no-meta[Ignore metadata changes]'
|
||||
'(-p --postpone)'{-p,--postpone}'[Wait until first change to execute command]'
|
||||
|
@ -25,8 +25,18 @@ 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 wrap it in `sh -c` resp. `cmd.exe /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.
|
||||
* `--shell` <shell>:
|
||||
Change the shell used to run the command. Set to `none` to run the command directly without a shell.
|
||||
|
||||
The special value `powershell` will use Microsoft Powershell's calling convention, otherwise `SHELL -c COMMAND`.
|
||||
|
||||
The `none` value is especially useful in combination with `--signal`, as the signal is then send directly to the specified command. While `--shell=none` is a little more performant than the default, it prevents using shell-features like pipes and redirects.
|
||||
|
||||
* `--no-shell`:
|
||||
Deprecated. Alias for `--shell=none`.
|
||||
|
||||
* `-n`:
|
||||
Shorthand for `--shell=none`.
|
||||
|
||||
* `--no-meta`:
|
||||
Ignore metadata changes.
|
||||
|
Loading…
Reference in New Issue
Block a user