Fix cli tests

This commit is contained in:
Félix Saparelli 2021-08-24 22:53:44 +12:00
parent 58b37940b8
commit 70e8a4dff2
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
4 changed files with 12 additions and 5 deletions

View File

@ -8,6 +8,10 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[cli/tests/snapshots/*]
indent_style = space
trim_trailing_whitespace = false
[*.{md,ronn}]
indent_style = space
indent_size = 4

View File

@ -27,6 +27,7 @@ pub fn get_args() -> Result<ArgMatches<'static>> {
.help("Watch a specific file or directory")
.short("w")
.long("watch")
.value_name("path")
.number_of_values(1)
.multiple(true)
.takes_value(true))

View File

@ -10,7 +10,6 @@ USAGE:
watchexec [FLAGS] [OPTIONS] <command>...
FLAGS:
--changes-only Only print path change information. Overridden by --verbose
-c, --clear Clear screen before executing command
-h, --help Prints help information
--no-default-ignore Skip auto-ignoring of commonly ignored globs
@ -23,9 +22,10 @@ FLAGS:
-N, --notify Send a desktop notification when watchexec notices a change (experimental, behaviour may
change)
-p, --postpone Wait until first change to execute command
--print-events Print events that trigger actions
-r, --restart Restart the process if it's still running. Shorthand for --on-busy-update=restart
-V, --version Prints version information
-v, --verbose Print debugging messages to stderr
-v, --verbose Print debugging messages (-v, -vv, -vvv; use -vvv for bug reports)
-W, --watch-when-idle Deprecated alias for --on-busy-update=do-nothing, which will become the default in 2.0.
OPTIONS:
@ -40,7 +40,8 @@ OPTIONS:
-w, --watch <path>... Watch a specific file or directory
--force-poll <interval> Force polling mode (interval in milliseconds)
--shell <shell> Use a different shell, or `none`. E.g. --shell=bash
-s, --signal <signal> Send signal to process upon changes, e.g. SIGHUP
-s, --signal <signal> Specify the signal to send when using --on-busy-update=signal [default:
SIGTERM]
ARGS:
<command>... Command to execute

View File

@ -23,9 +23,10 @@ FLAGS:
-N, --notify Send a desktop notification when watchexec notices a change (experimental, behaviour may
change)
-p, --postpone Wait until first change to execute command
--print-events Print events that trigger actions
-r, --restart Restart the process if it's still running. Shorthand for --on-busy-update=restart
-V, --version Prints version information
-v, --verbose Print debugging messages to stderr
-v, --verbose Print debugging messages (-v, -vv, -vvv; use -vvv for bug reports)
-W, --watch-when-idle Deprecated alias for --on-busy-update=do-nothing, which will become the default in 2.0.
OPTIONS:
@ -41,10 +42,10 @@ OPTIONS:
--force-poll <interval> Force polling mode (interval in milliseconds)
--shell <shell> Use a different shell, or `none`. Try --shell=powershell, which will become
the default in 2.0.
-s, --signal <signal> Send signal to process upon changes, e.g. SIGHUP
ARGS:
<command>... Command to execute
Use @argfile as first argument to load arguments from the file `argfile` (one argument per line) which will be inserted
in place of the @argfile (further arguments on the CLI will override or add onto those in the file).