mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-18 20:21:04 +00:00
Make inputs required (show help if not provided) (#329)
This commit is contained in:
parent
dd667a656c
commit
712bdfa8cb
2 changed files with 5 additions and 6 deletions
|
|
@ -140,7 +140,7 @@ outdated information.
|
|||
Run it inside a repository with a `README.md`:
|
||||
|
||||
```sh
|
||||
lychee
|
||||
lychee README.md
|
||||
```
|
||||
|
||||
You can also specify various types of inputs:
|
||||
|
|
@ -190,7 +190,7 @@ see below for a full list.
|
|||
|
||||
```ignore
|
||||
USAGE:
|
||||
lychee [FLAGS] [OPTIONS] [--] [inputs]...
|
||||
lychee [FLAGS] [OPTIONS] <inputs>...
|
||||
|
||||
FLAGS:
|
||||
--dump Don't perform any link checking. Instead, dump all the links extracted from inputs that
|
||||
|
|
@ -238,8 +238,7 @@ OPTIONS:
|
|||
ARGS:
|
||||
<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.org/README.md`) or standard
|
||||
input (`-`). Prefix with `--` to separate inputs from options that allow multiple arguments
|
||||
[default: README.md]
|
||||
input (`-`). NOTE: Use `--` to separate inputs from options that allow multiple arguments
|
||||
```
|
||||
|
||||
### Exit codes
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ 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.org/README.md`) or standard input (`-`).
|
||||
/// Prefix with `--` to separate inputs from options that allow multiple arguments.
|
||||
#[structopt(name = "inputs", default_value = "README.md")]
|
||||
/// NOTE: Use `--` to separate inputs from options that allow multiple arguments.
|
||||
#[structopt(name = "inputs", required = true)]
|
||||
raw_inputs: Vec<String>,
|
||||
|
||||
/// Configuration file to use
|
||||
|
|
|
|||
Loading…
Reference in a new issue