Document --watch-when-idle much more thoroughly

This commit is contained in:
Félix Saparelli 2021-04-11 03:31:44 +12:00
parent 1b5bdee08e
commit f32943bfd2
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
3 changed files with 6 additions and 3 deletions

View File

@ -11,13 +11,14 @@ cmd="$words[1]"
args=( args=(
'(-c --clear)'{-c,--clear}'[Clear screen before executing command]' '(-c --clear)'{-c,--clear}'[Clear screen before executing command]'
'(-h --help)'{-h,--help}'[Prints help information]' '(-h --help)'{-h,--help}'[Prints help information]'
'--shell=[Change the wrapping shell, or `none` to disable]' '--shell=[Change the wrapping shell, or set to none to disable]'
'--no-shell[Deprecated, use --shell=none]' '--no-shell[Deprecated, use --shell=none]'
'-n[Shorthand for --shell=none]' '-n[Shorthand for --shell=none]'
'--no-environment[Do not set WATCHEXEC_*_PATH environment variables for command]' '--no-environment[Do not set WATCHEXEC_*_PATH environment variables for command]'
'--no-meta[Ignore metadata changes]' '--no-meta[Ignore metadata changes]'
'(-p --postpone)'{-p,--postpone}'[Wait until first change to execute command]' '(-p --postpone)'{-p,--postpone}'[Wait until first change to execute command]'
'(-r --restart)'{-r,--restart}'[Restart the process if it''s still running]' '(-r --restart)'{-r,--restart}'[Restart the process if it''s still running]'
'(-W --watch-when-idle)'{-W,--watch-when-idle}'[Ignore events while the command is still running]'
'(-V --version)'{-V,--version}'[Prints version information]' '(-V --version)'{-V,--version}'[Prints version information]'
'(-v --verbose)'{-v,--verbose}'[Print debugging messages to stderr]' '(-v --verbose)'{-v,--verbose}'[Print debugging messages to stderr]'
'--changes-only[Print changed paths to stderr for pattern debugging]' '--changes-only[Print changed paths to stderr for pattern debugging]'

View File

@ -54,7 +54,9 @@ Monitor a specific path for changes. By default, the current working directory i
Terminates the command if it is still running when subsequent file modifications are detected. By default, sends `SIGTERM`; use `--signal` to change that. Terminates the command if it is still running when subsequent file modifications are detected. By default, sends `SIGTERM`; use `--signal` to change that.
* `-W`, `--watch-when-idle`: * `-W`, `--watch-when-idle`:
Ignore events while the process is still running. Ignore events while the process is still running. This is distinct from `--restart` in that with this option, events received while the command is running will not trigger a new run immediately after the current command is done.
This behaviour will become the default in v2.0.
* `-c`, `--clear`: * `-c`, `--clear`:
Clears the screen before executing <command>. Clears the screen before executing <command>.

View File

@ -130,7 +130,7 @@ where
.long("no-environment")) .long("no-environment"))
.arg(Arg::with_name("once").short("1").hidden(true)) .arg(Arg::with_name("once").short("1").hidden(true))
.arg(Arg::with_name("watch-when-idle") .arg(Arg::with_name("watch-when-idle")
.help("Ignore events while the process is still running") .help("Ignore events while the process is still running. This is distinct from `--restart` in that with this option, events received while the command is running will not trigger a new run immediately after the current command is done. Will become the default in 2.0.")
.short("W") .short("W")
.long("watch-when-idle")); .long("watch-when-idle"));