Rename --manpage to --manual (#529)
This commit is contained in:
parent
8156864bf3
commit
80e18ea145
|
@ -79,7 +79,7 @@ jobs:
|
|||
shell: bash
|
||||
|
||||
- name: Generate manpage
|
||||
run: cargo run ${{ env.flags }} -p watchexec-cli -- --manpage > doc/watchexec.1
|
||||
run: cargo run ${{ env.flags }} -p watchexec-cli -- --manual > doc/watchexec.1
|
||||
- name: Check that manpage is up to date
|
||||
run: git diff --exit-code -- doc/
|
||||
|
||||
|
|
|
@ -1137,9 +1137,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix"
|
||||
version = "0.39.0"
|
||||
version = "0.42.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dabfac58aecb4a38cdd2568de66eb1f0d968fd6726f5a80cb8bea7944ef10cc0"
|
||||
checksum = "fd5e0d9c5df90c9b4d325ec716762beb7d6c1465a4049fec5c4f6b72e7824656"
|
||||
dependencies = [
|
||||
"gix-actor",
|
||||
"gix-attributes",
|
||||
|
@ -1235,9 +1235,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-config"
|
||||
version = "0.18.0"
|
||||
version = "0.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52c62e26ce11f607712e4f49a0a192ed87675d30187fd61be070abbd607d12f1"
|
||||
checksum = "6aa7d7dd60256b7a0c0506a1d708ec92767c2662ee57b3301b538eaa3e064f8a"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-config-value",
|
||||
|
@ -1269,9 +1269,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-credentials"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5be32b5fe339a31b8e53fa854081dc914c45020dcb64637f3c21baf69c96fc1b"
|
||||
checksum = "750b684197374518ea057e0a0594713e07683faa0a3f43c0f93d97f64130ad8d"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-command",
|
||||
|
@ -1309,9 +1309,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-discover"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91c204adba5ebd211c74735cbb65817d277e154486bac0dffa3701f163b80350"
|
||||
checksum = "1b58931ab475a977deff03417e041a66e4bcb76c4e5797e7ec2fcb272ebce01c"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"dunce",
|
||||
|
@ -1376,9 +1376,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-index"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c12caf7886c7ba06f2b28835cdc2be1dca86bd047d00299d2d49e707ce1c2616"
|
||||
checksum = "546ee7855d5d8731288f05a63c07ab41b59cb406660a825ed3fe89d7223823df"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bstr",
|
||||
|
@ -1398,9 +1398,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-lock"
|
||||
version = "4.0.0"
|
||||
version = "5.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66119ff8a4a395d0ea033fef718bc85f8b4f0855874f4ce1e005fc16cfe1f66e"
|
||||
checksum = "41b80172055c5d8017a48ddac5cc7a95421c00211047db0165c97853c4f05194"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"gix-tempfile",
|
||||
|
@ -1439,9 +1439,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-odb"
|
||||
version = "0.42.0"
|
||||
version = "0.43.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9a5f9e1afbd509761977a2ea02869cedaaba500b4e783deb2e4de5179a55a80"
|
||||
checksum = "aa63fce01e5bce663bb24ad01fa2b77266e91b1d1982aab3f67cb0aed8af8169"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"gix-features",
|
||||
|
@ -1457,9 +1457,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-pack"
|
||||
version = "0.32.0"
|
||||
version = "0.33.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51db84e1459a8022e518d40a8778028d793dbb28e4d35c9a5eaf92658fb0775"
|
||||
checksum = "e122e8e688313bdbd7ea40631beea562a56211e351ad24739fe412ab6df4e4b7"
|
||||
dependencies = [
|
||||
"clru",
|
||||
"gix-chunk",
|
||||
|
@ -1514,9 +1514,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-ref"
|
||||
version = "0.26.0"
|
||||
version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90a0ed29e581f04b904ecd0c32b11f33b8209b5a0af9c43f415249a4f2fba632"
|
||||
checksum = "0949e07aa4ed00a5936c2f4529013540708f367906f542cf19db814957e80449"
|
||||
dependencies = [
|
||||
"gix-actor",
|
||||
"gix-features",
|
||||
|
@ -1574,9 +1574,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-tempfile"
|
||||
version = "4.1.0"
|
||||
version = "5.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8e0227bd284cd16105e8479602bb8af6bddcb800427e881c1feee4806310a31"
|
||||
checksum = "aed73ef9642f779d609fd19acc332ac1597b978ee87ec11743a68eefaed65bfa"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"once_cell",
|
||||
|
@ -1600,9 +1600,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-url"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "044072b7ce8601b62dcec841b92129f5cc677072823324121b395d766ac5f528"
|
||||
checksum = "b6a22b4b32ad14d68f7b7fb6458fa58d44b01797d94c1b8f4db2d9c7b3c366b5"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-features",
|
||||
|
@ -1624,9 +1624,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gix-worktree"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7cb9af6e56152953d8fe113c4f9d7cf60cf7a982362711e9200a255579b49cb"
|
||||
checksum = "992b8fdade33e079dc61c29f2388ab8e049965ebf7be40efa7f8b80e3c4543fe"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-attributes",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
cargo run -p watchexec-cli -- --manpage > doc/watchexec.1
|
||||
cargo run -p watchexec-cli -- --manual > doc/watchexec.1
|
||||
roff2pdf < doc/watchexec.1 > doc/watchexec.1.pdf
|
||||
pandoc doc/watchexec.1 -t markdown > doc/watchexec.1.md
|
||||
|
|
|
@ -19,7 +19,7 @@ _watchexec() {
|
|||
|
||||
case "${cmd}" in
|
||||
watchexec)
|
||||
opts="-w -c -o -W -r -s -k -p -n -E -1 -N -e -f -i -v -h -V --watch --clear --on-busy-update --watch-when-idle --restart --signal --kill --stop-signal --stop-timeout --debounce --stdin-quit --no-vcs-ignore --no-project-ignore --no-global-ignore --no-default-ignore --postpone --delay-run --poll --shell --no-shell-long --no-environment --emit-events-to --env --no-process-group --notify --project-origin --workdir --exts --filter --filter-file --ignore --ignore-file --fs-events --no-meta --print-events --verbose --log-file --manpage --completions --help --version [COMMAND]..."
|
||||
opts="-w -c -o -W -r -s -k -p -n -E -1 -N -e -f -i -v -h -V --watch --clear --on-busy-update --watch-when-idle --restart --signal --kill --stop-signal --stop-timeout --debounce --stdin-quit --no-vcs-ignore --no-project-ignore --no-global-ignore --no-default-ignore --postpone --delay-run --poll --shell --no-shell-long --no-environment --emit-events-to --env --no-process-group --notify --project-origin --workdir --exts --filter --filter-file --ignore --ignore-file --fs-events --no-meta --print-events --verbose --log-file --manual --completions --help --version [COMMAND]..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
|
|
|
@ -72,7 +72,7 @@ set edit:completion:arg-completer[watchexec] = {|@words|
|
|||
cand --print-events 'Print events that trigger actions'
|
||||
cand -v 'Set diagnostic log level'
|
||||
cand --verbose 'Set diagnostic log level'
|
||||
cand --manpage 'Show the manual page'
|
||||
cand --manual 'Show the manual page'
|
||||
cand -h 'Print help (see more with ''--help'')'
|
||||
cand --help 'Print help (see more with ''--help'')'
|
||||
cand -V 'Print version'
|
||||
|
|
|
@ -38,6 +38,6 @@ complete -c watchexec -s N -l notify -d 'Alert when commands start and end'
|
|||
complete -c watchexec -l no-meta -d 'Don\'t emit fs events for metadata changes'
|
||||
complete -c watchexec -l print-events -d 'Print events that trigger actions'
|
||||
complete -c watchexec -s v -l verbose -d 'Set diagnostic log level'
|
||||
complete -c watchexec -l manpage -d 'Show the manual page'
|
||||
complete -c watchexec -l manual -d 'Show the manual page'
|
||||
complete -c watchexec -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c watchexec -s V -l version -d 'Print version'
|
||||
|
|
|
@ -62,7 +62,7 @@ module completions {
|
|||
--print-events # Print events that trigger actions
|
||||
--verbose(-v) # Set diagnostic log level
|
||||
--log-file: string # Write diagnostic logs to a file
|
||||
--manpage # Show the manual page
|
||||
--manual # Show the manual page
|
||||
--completions: string@"nu-complete watchexec completions" # Generate a shell completions script
|
||||
--help(-h) # Print help (see more with '--help')
|
||||
--version(-V) # Print version
|
||||
|
|
|
@ -75,7 +75,7 @@ Register-ArgumentCompleter -Native -CommandName 'watchexec' -ScriptBlock {
|
|||
[CompletionResult]::new('--print-events', 'print-events', [CompletionResultType]::ParameterName, 'Print events that trigger actions')
|
||||
[CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Set diagnostic log level')
|
||||
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Set diagnostic log level')
|
||||
[CompletionResult]::new('--manpage', 'manpage', [CompletionResultType]::ParameterName, 'Show the manual page')
|
||||
[CompletionResult]::new('--manual', 'manual', [CompletionResultType]::ParameterName, 'Show the manual page')
|
||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
|
||||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
|
||||
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version')
|
||||
|
|
|
@ -44,7 +44,7 @@ _watchexec() {
|
|||
'*--ignore-file=[Files to load ignores from]:PATH:_files' \
|
||||
'*--fs-events=[Filesystem events to filter to]:EVENTS:(access create remove rename modify metadata)' \
|
||||
'--log-file=[Write diagnostic logs to a file]' \
|
||||
'(--manpage)--completions=[Generate a shell completions script]:COMPLETIONS:(bash elvish fish nu powershell zsh)' \
|
||||
'(--manual)--completions=[Generate a shell completions script]:COMPLETIONS:(bash elvish fish nu powershell zsh)' \
|
||||
'(-o --on-busy-update -r --restart)-W[Deprecated alias for '\''--on-busy-update=do-nothing'\'']' \
|
||||
'(-o --on-busy-update -r --restart)--watch-when-idle[Deprecated alias for '\''--on-busy-update=do-nothing'\'']' \
|
||||
'(-o --on-busy-update -W --watch-when-idle)-r[Restart the process if it'\''s still running]' \
|
||||
|
@ -69,7 +69,7 @@ _watchexec() {
|
|||
'--print-events[Print events that trigger actions]' \
|
||||
'*-v[Set diagnostic log level]' \
|
||||
'*--verbose[Set diagnostic log level]' \
|
||||
'(--completions)--manpage[Show the manual page]' \
|
||||
'(--completions)--manual[Show the manual page]' \
|
||||
'-h[Print help (see more with '\''--help'\'')]' \
|
||||
'--help[Print help (see more with '\''--help'\'')]' \
|
||||
'-V[Print version]' \
|
||||
|
|
|
@ -87,7 +87,7 @@ pub struct Args {
|
|||
num_args = 1..,
|
||||
value_hint = ValueHint::CommandString,
|
||||
value_name = "COMMAND",
|
||||
required_unless_present_any = ["completions", "manpage"],
|
||||
required_unless_present_any = ["completions", "manual"],
|
||||
)]
|
||||
pub command: Vec<String>,
|
||||
|
||||
|
@ -788,7 +788,7 @@ pub struct Args {
|
|||
help_heading = OPTSET_DEBUGGING,
|
||||
conflicts_with_all = ["command", "completions"],
|
||||
)]
|
||||
pub manpage: bool,
|
||||
pub manual: bool,
|
||||
|
||||
/// Generate a shell completions script
|
||||
///
|
||||
|
@ -799,7 +799,7 @@ pub struct Args {
|
|||
#[arg(
|
||||
long,
|
||||
help_heading = OPTSET_DEBUGGING,
|
||||
conflicts_with_all = ["command", "manpage"],
|
||||
conflicts_with_all = ["command", "manual"],
|
||||
)]
|
||||
pub completions: Option<ShellCompletion>,
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ pub async fn run() -> Result<()> {
|
|||
let args = init().await?;
|
||||
debug!(?args, "arguments");
|
||||
|
||||
if args.manpage {
|
||||
if args.manual {
|
||||
run_manpage(args).await
|
||||
} else if let Some(shell) = args.completions {
|
||||
run_completions(shell).await
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.SH NAME
|
||||
watchexec \- Execute commands when watched files change
|
||||
.SH SYNOPSIS
|
||||
\fBwatchexec\fR [\fB\-w\fR|\fB\-\-watch\fR] [\fB\-c\fR|\fB\-\-clear\fR] [\fB\-o\fR|\fB\-\-on\-busy\-update\fR] [\fB\-r\fR|\fB\-\-restart\fR] [\fB\-s\fR|\fB\-\-signal\fR] [\fB\-\-stop\-signal\fR] [\fB\-\-stop\-timeout\fR] [\fB\-\-debounce\fR] [\fB\-\-stdin\-quit\fR] [\fB\-\-no\-vcs\-ignore\fR] [\fB\-\-no\-project\-ignore\fR] [\fB\-\-no\-global\-ignore\fR] [\fB\-\-no\-default\-ignore\fR] [\fB\-p\fR|\fB\-\-postpone\fR] [\fB\-\-delay\-run\fR] [\fB\-\-poll\fR] [\fB\-\-shell\fR] [\fB\-n \fR] [\fB\-\-no\-environment\fR] [\fB\-\-emit\-events\-to\fR] [\fB\-E\fR|\fB\-\-env\fR] [\fB\-\-no\-process\-group\fR] [\fB\-N\fR|\fB\-\-notify\fR] [\fB\-\-project\-origin\fR] [\fB\-\-workdir\fR] [\fB\-e\fR|\fB\-\-exts\fR] [\fB\-f\fR|\fB\-\-filter\fR] [\fB\-\-filter\-file\fR] [\fB\-i\fR|\fB\-\-ignore\fR] [\fB\-\-ignore\-file\fR] [\fB\-\-fs\-events\fR] [\fB\-\-no\-meta\fR] [\fB\-\-print\-events\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-\-log\-file\fR] [\fB\-\-manpage\fR] [\fB\-\-completions\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fICOMMAND\fR]
|
||||
\fBwatchexec\fR [\fB\-w\fR|\fB\-\-watch\fR] [\fB\-c\fR|\fB\-\-clear\fR] [\fB\-o\fR|\fB\-\-on\-busy\-update\fR] [\fB\-r\fR|\fB\-\-restart\fR] [\fB\-s\fR|\fB\-\-signal\fR] [\fB\-\-stop\-signal\fR] [\fB\-\-stop\-timeout\fR] [\fB\-\-debounce\fR] [\fB\-\-stdin\-quit\fR] [\fB\-\-no\-vcs\-ignore\fR] [\fB\-\-no\-project\-ignore\fR] [\fB\-\-no\-global\-ignore\fR] [\fB\-\-no\-default\-ignore\fR] [\fB\-p\fR|\fB\-\-postpone\fR] [\fB\-\-delay\-run\fR] [\fB\-\-poll\fR] [\fB\-\-shell\fR] [\fB\-n \fR] [\fB\-\-no\-environment\fR] [\fB\-\-emit\-events\-to\fR] [\fB\-E\fR|\fB\-\-env\fR] [\fB\-\-no\-process\-group\fR] [\fB\-N\fR|\fB\-\-notify\fR] [\fB\-\-project\-origin\fR] [\fB\-\-workdir\fR] [\fB\-e\fR|\fB\-\-exts\fR] [\fB\-f\fR|\fB\-\-filter\fR] [\fB\-\-filter\-file\fR] [\fB\-i\fR|\fB\-\-ignore\fR] [\fB\-\-ignore\-file\fR] [\fB\-\-fs\-events\fR] [\fB\-\-no\-meta\fR] [\fB\-\-print\-events\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-\-log\-file\fR] [\fB\-\-manual\fR] [\fB\-\-completions\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fICOMMAND\fR]
|
||||
.SH DESCRIPTION
|
||||
Execute commands when watched files change.
|
||||
.PP
|
||||
|
@ -427,7 +427,7 @@ If a path is not provided, the default is the working directory. Note that with
|
|||
|
||||
If the path provided is a directory, a file will be created in that directory. The file name will be the current date and time, in the format \*(Aqwatchexec.YYYY\-MM\-DDTHH\-MM\-SSZ.log\*(Aq.
|
||||
.TP
|
||||
\fB\-\-manpage\fR
|
||||
\fB\-\-manual\fR
|
||||
Show the manual page
|
||||
|
||||
This shows the manual page for Watchexec, if the output is a terminal and the \*(Aqman\*(Aq program is available. If not, the manual page is printed to stdout in ROFF format (suitable for writing to a watchexec.1 file).
|
||||
|
|
|
@ -17,7 +17,7 @@ watchexec - Execute commands when watched files change
|
|||
\[**-e**\|**\--exts**\] \[**-f**\|**\--filter**\] \[**\--filter-file**\]
|
||||
\[**-i**\|**\--ignore**\] \[**\--ignore-file**\] \[**\--fs-events**\]
|
||||
\[**\--no-meta**\] \[**\--print-events**\]
|
||||
\[**-v**\|**\--verbose**\]\... \[**\--log-file**\] \[**\--manpage**\]
|
||||
\[**-v**\|**\--verbose**\]\... \[**\--log-file**\] \[**\--manual**\]
|
||||
\[**\--completions**\] \[**-h**\|**\--help**\]
|
||||
\[**-V**\|**\--version**\] \[*COMMAND*\]
|
||||
|
||||
|
@ -601,7 +601,7 @@ If the path provided is a directory, a file will be created in that
|
|||
directory. The file name will be the current date and time, in the
|
||||
format watchexec.YYYY-MM-DDTHH-MM-SSZ.log.
|
||||
|
||||
**\--manpage**
|
||||
**\--manual**
|
||||
|
||||
: Show the manual page
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue