diff --git a/README.md b/README.md index 5531f555b6..6a19302f99 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,12 @@ Usage: lychee [OPTIONS] [inputs]... Arguments: [inputs]... - The inputs (where to get links to check from). These can be: files (e.g. `README.md`), file globs (e.g. `"~/git/*/README.md"`), remote URLs (e.g. `https://example.com/README.md`) or standard input (`-`). Alternatively, use `--files-from` to read inputs from a file. NOTE: Use `--` to separate inputs from options that allow multiple arguments + Inputs for link checking (where to get links to check from). These can be: + files (e.g. `README.md`), file globs (e.g. `'~/git/*/README.md'`), remote URLs + (e.g. `https://example.com/README.md`), or standard input (`-`). Alternatively, + use `--files-from` to read inputs from a file. + + NOTE: Use `--` to separate inputs from options that allow multiple arguments. Options: --files-from @@ -391,9 +396,9 @@ Options: - 500..=599 (excludes any status code from 500 to 599 inclusive) - 500..600 (excludes any status code from 500 to 600 excluding 600, same as 500..=599) - Use "lychee --cache-exclude-status '429, 500..502' ..." to provide a comma- separated - list of excluded status codes. This example will not cache results with a status code of 429, 500 - and 501. + Use "lychee --cache-exclude-status '429, 500..502' ..." to provide a + comma-separated list of excluded status codes. This example will not cache results + with a status code of 429, 500 and 501. [default: ] @@ -443,7 +448,8 @@ Options: Proceed for server connections considered insecure (invalid TLS) -s, --scheme - Only test links with the given schemes (e.g. https). Omit to check links with any other scheme. At the moment, we support http, https, file, and mailto + Only test links with the given schemes (e.g. https). Omit to check links with + any other scheme. At the moment, we support http, https, file, and mailto. --offline Only check local files and block network requests @@ -635,7 +641,9 @@ Options: When HTTPS is available, treat HTTP links as errors --cookie-jar - Tell lychee to read cookies from the given file. Cookies will be stored in the cookie jar and sent with requests. New cookies will be stored in the cookie jar and existing cookies will be updated + Tell lychee to read cookies from the given file. Cookies will be stored in the + cookie jar and sent with requests. New cookies will be stored in the cookie jar + and existing cookies will be updated. --include-wikilinks Check WikiLinks in Markdown files diff --git a/lychee-bin/src/options.rs b/lychee-bin/src/options.rs index ed4bd5a8b1..f43a03d38f 100644 --- a/lychee-bin/src/options.rs +++ b/lychee-bin/src/options.rs @@ -312,12 +312,17 @@ impl HeaderMapExt for HeaderMap { #[derive(Parser, Debug)] #[command(version, about)] pub(crate) struct LycheeOptions { - /// The inputs (where to get links to check from). - /// These can be: files (e.g. `README.md`), file globs (e.g. `"~/git/*/README.md"`), - /// remote URLs (e.g. `https://example.com/README.md`) or standard input (`-`). - /// Alternatively, use `--files-from` to read inputs from a file. - /// NOTE: Use `--` to separate inputs from options that allow multiple arguments. - #[arg(name = "inputs", required_unless_present = "files_from")] + /// Inputs for link checking (where to get links to check from). + #[arg( + name = "inputs", + required_unless_present = "files_from", + long_help = "Inputs for link checking (where to get links to check from). These can be: +files (e.g. `README.md`), file globs (e.g. `'~/git/*/README.md'`), remote URLs +(e.g. `https://example.com/README.md`), or standard input (`-`). Alternatively, +use `--files-from` to read inputs from a file. + +NOTE: Use `--` to separate inputs from options that allow multiple arguments." + )] raw_inputs: Vec, /// Read input filenames from the given file or stdin (if path is '-'). @@ -446,9 +451,9 @@ examples are: - 500..=599 (excludes any status code from 500 to 599 inclusive) - 500..600 (excludes any status code from 500 to 600 excluding 600, same as 500..=599) -Use \"lychee --cache-exclude-status '429, 500..502' ...\" to provide a comma- separated -list of excluded status codes. This example will not cache results with a status code of 429, 500 -and 501." +Use \"lychee --cache-exclude-status '429, 500..502' ...\" to provide a +comma-separated list of excluded status codes. This example will not cache results +with a status code of 429, 500 and 501." )] #[serde(default = "cache_exclude_selector")] pub(crate) cache_exclude_status: StatusCodeExcluder, @@ -516,7 +521,12 @@ and 501." /// Only test links with the given schemes (e.g. https). /// Omit to check links with any other scheme. /// At the moment, we support http, https, file, and mailto. - #[arg(short, long)] + #[arg( + short, + long, + long_help = "Only test links with the given schemes (e.g. https). Omit to check links with +any other scheme. At the moment, we support http, https, file, and mailto." + )] #[serde(default)] pub(crate) scheme: Vec, @@ -798,10 +808,13 @@ followed by the absolute link's own path." #[serde(default)] pub(crate) require_https: bool, - /// Tell lychee to read cookies from the given file. - /// Cookies will be stored in the cookie jar and sent with requests. - /// New cookies will be stored in the cookie jar and existing cookies will be updated. - #[arg(long)] + /// Read and write cookies using the given file + #[arg( + long, + long_help = "Tell lychee to read cookies from the given file. Cookies will be stored in the +cookie jar and sent with requests. New cookies will be stored in the cookie jar +and existing cookies will be updated." + )] #[serde(default)] pub(crate) cookie_jar: Option,