Add basic manpage

This commit is contained in:
Félix Saparelli 2021-04-12 01:32:41 +12:00
parent 1e5d994bbf
commit fe03fbc5ab
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
3 changed files with 308 additions and 0 deletions

2
bin/manpage Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec ronn --roff cargo-watch.1.ronn

194
cargo-watch.1 Normal file
View File

@ -0,0 +1,194 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "CARGO\-WATCH" "1" "April 2021" "" ""
.
.SH "NAME"
\fBcargo\-watch\fR \- watches over your Cargo project\'s source
.
.SH "SYNOPSIS"
cargo watch [\fB\-\-exec\fR | \fB\-x\fR \fIcargo subcommand\fR]\.\.\. [\fB\-\-shell\fR | \fB\-s\fR \fIcommand\fR]\.\.\. [\fB\-\-ignore\fR | \fB\-i\fR \fIpattern\fR]\.\.\. [\fB\-\-watch\fR | \fB\-w\fR \fIpath\fR]\.\.\. [\fB\-\-features\fR \fIlist\fR] [\fB\-\-no\-restart\fR] [\fB\-\-watch\-when\-idle\fR] [\fB\-\-clear\fR | \fB\-c\fR] [\fB\-\-use\-shell\fR \fIprogram\fR] [\fB\-\-postpone\fR] [\fB\-\-poll\fR \fIinterval\fR] [\fB\-\-delay\fR | \fB\-d\fR \fIseconds\fR] [\fB\-\-no\-gitignore\fR] [\fB\-\-no\-ignore\fR] [\fB\-\-ignore\-nothing\fR] [\fB\-\-debug\fR ] [\fB\-\-why\fR] [\fB\-\-quiet\fR] [\fB\-\-version\fR | \fB\-V\fR] [\-\- \fIcommand\fR\.\.\.]
.
.SH "DESCRIPTION"
Watches over your project\'s source for changes, and runs Cargo commands when they occur\.
.
.SH "COMMANDS"
.
.TP
\fIcargo subcommand\fR
Cargo subcommand to run when watched files are modified, and at startup, unless \fB\-\-postpone\fR is specified\.
.
.P
This is essentially the same as \fB<command>\fR but with \fBcargo\fR prepended, except that in addition, cargo\-specific options are applied, such as \fB\-\-features\fR\.
.
.TP
\fIcommand\fR
Command to run when watched files are modified, and at startup, unless \fB\-\-postpone\fR is specified\.
.
.P
All commands passed are joined together with \fB&&\fR\.
.
.P
Cargo commands (\fB\-x\fR) are always executed before shell commands (\fB\-s\fR)\.
.
.P
If a trailing command is given with \fB\-\- <command>\fR, it supersedes all other commands\.
.
.SH "OPTIONS"
.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display this message\.
.
.TP
\fB\-V\fR, \fB\-\-version\fR
Display version information\.
.
.TP
\fB\-\-debug\fR
Show debug output\.
.
.TP
\fB\-\-why\fR
Show paths that changed\.
.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress output from cargo\-watch itself\.
.
.TP
\fB\-w\fR, \fB\-\-watch\fR \fIwatch\fR\.\.\.
Watch specific file(s) or folder(s)\.
.
.P
By default, your entire project is watched, except for the target/ and \.git/ folders, and your \.ignore and \.gitignore files are used to filter paths\.
.
.TP
\fB\-i\fR, \fB\-\-ignore\fR \fIpattern\fR\.\.\.
Ignore a glob/gitignore\-style pattern\.
.
.P
On Windows, patterns given to \-i have forward slashes (/) automatically converted to backward ones () to ease command portability\.
.
.TP
\fB\-\-no\-gitignore\fR
Dont use \.gitignore files\.
.
.TP
\fB\-\-no\-ignore\fR
Dont use \.ignore files\.
.
.TP
\fB\-\-ignore\-nothing\fR
Ignore nothing, not even target/ and \.git/\.
.
.TP
\fB\-c\fR, \fB\-\-clear\fR
Clear the screen before each run\.
.
.TP
\fB\-\-postpone\fR
Postpone first run until a file changes\.
.
.TP
\fB\-\-poll\fR
Force use of polling for file changes\.
.
.TP
\fB\-d\fR, \fB\-\-delay\fR \fIdelay\fR
File updates debounce delay in seconds (default: 0\.5)\.
.
.TP
\fB\-\-no\-restart\fR
Dont restart command while its still running\.
.
.TP
\fB\-\-watch\-when\-idle\fR
Ignore events emitted while the commands run\. Will become default behaviour in 8\.0\.
.
.TP
\fB\-\-features\fR \fIfeatures\fR
List of features passed to cargo invocations\.
.
.TP
\fB\-\-use\-shell\fR \fIuse\-shell\fR
Use a different shell\. E\.g\. \fB\-\-use\-shell=bash\fR\. On Windows, try \fB\-\-use\-shell=powershell\fR, which will become the default in 8\.0\.
.
.SH "EXAMPLES"
Run \fBcargo check\fR on file save:
.
.IP "" 4
.
.nf
$ cargo watch
.
.fi
.
.IP "" 0
.
.P
Run tests only:
.
.IP "" 4
.
.nf
$ cargo watch \-x test
.
.fi
.
.IP "" 0
.
.P
Run check then tests:
.
.IP "" 4
.
.nf
$ cargo watch \-x check \-x test
.
.fi
.
.IP "" 0
.
.P
Run run with arguments:
.
.IP "" 4
.
.nf
$ cargo watch \-x \'run \-\- \-\-some\-arg\'
.
.fi
.
.IP "" 0
.
.P
Run an arbitrary command:
.
.IP "" 4
.
.nf
$ cargo watch \-\- echo Hello world
.
.fi
.
.IP "" 0
.
.P
Run with features passed to cargo:
.
.IP "" 4
.
.nf
$ cargo watch \-\-features \'foo,bar\'
.
.fi
.
.IP "" 0

112
cargo-watch.1.ronn Normal file
View File

@ -0,0 +1,112 @@
cargo-watch(1) -- watches over your Cargo project's source
==========================================================
## SYNOPSIS
cargo watch [`--exec` | `-x` <cargo subcommand>]... [`--shell` | `-s` <command>]... [`--ignore` | `-i` <pattern>]... [`--watch` | `-w` <path>]... [`--features` <list>] [`--no-restart`] [`--watch-when-idle`] [`--clear` | `-c`] [`--use-shell` <program>] [`--postpone`] [`--poll` <interval>] [`--delay` | `-d` <seconds>] [`--no-gitignore`] [`--no-ignore`] [`--ignore-nothing`] [`--debug` ] [`--why`] [`--quiet`] [`--version` | `-V`] [-- <command>...]
## DESCRIPTION
Watches over your project's source for changes, and runs Cargo commands when they occur.
## COMMANDS
* <cargo subcommand>:
Cargo subcommand to run when watched files are modified, and at startup, unless `--postpone` is specified.
This is essentially the same as `<command>` but with `cargo ` prepended, except that in addition, cargo-specific options are applied, such as `--features`.
* <command>:
Command to run when watched files are modified, and at startup, unless `--postpone` is specified.
All commands passed are joined together with `&&`.
Cargo commands (`-x`) are always executed before shell commands (`-s`).
If a trailing command is given with `-- <command>`, it supersedes all other commands.
## OPTIONS
* `-h`, `--help`:
Display this message.
* `-V`, `--version`:
Display version information.
* `--debug`:
Show debug output.
* `--why`:
Show paths that changed.
* `-q`, `--quiet`:
Suppress output from cargo-watch itself.
* `-w`, `--watch` <watch>...:
Watch specific file(s) or folder(s).
By default, your entire project is watched, except for the target/ and .git/ folders, and your .ignore and .gitignore files are used to filter paths.
* `-i`, `--ignore` <pattern>...:
Ignore a glob/gitignore-style pattern.
On Windows, patterns given to -i have forward slashes (/) automatically converted to backward ones (\) to ease command portability.
* `--no-gitignore`:
Dont use .gitignore files.
* `--no-ignore`:
Dont use .ignore files.
* `--ignore-nothing`:
Ignore nothing, not even target/ and .git/.
* `-c`, `--clear`:
Clear the screen before each run.
* `--postpone`:
Postpone first run until a file changes.
* `--poll`:
Force use of polling for file changes.
* `-d`, `--delay` <delay>:
File updates debounce delay in seconds (default: 0.5).
* `--no-restart`:
Dont restart command while its still running.
* `--watch-when-idle`:
Ignore events emitted while the commands run. Will become default behaviour in 8.0.
* `--features` <features>:
List of features passed to cargo invocations.
* `--use-shell` <use-shell>:
Use a different shell. E.g. `--use-shell=bash`. On Windows, try `--use-shell=powershell`, which will become the default in 8.0.
## EXAMPLES
Run `cargo check` on file save:
$ cargo watch
Run tests only:
$ cargo watch -x test
Run check then tests:
$ cargo watch -x check -x test
Run run with arguments:
$ cargo watch -x 'run -- --some-arg'
Run an arbitrary command:
$ cargo watch -- echo Hello world
Run with features passed to cargo:
$ cargo watch --features 'foo,bar'