use crate::dependency::Dependency;
#[derive(clap::Parser, Debug, Clone)]
#[command(author, version, about, long_about)]
pub struct Cli {
#[arg(long_help(
"Each DEPENDENCY can take one of the following forms:
(<NAME> | <URL>[#<BRANCH> | <REV>])[=|==|>|<|>=|<=|~<VERSION>][+][+<FEATURE>...]
You must provide either a `NAME` (e.g. `anyhow`) or a `URL` pointing to a git repository. URLs can
use `http(s)` or `ssh` schemes and may include a branch or a revision using `#`.
You can optionally specify a version with `=` (e.g. `tokio=1.48`) or with an operator that follows
Cargo's comparison requirements:
- `==`: Exact version (e.g. `tokio==1.48`).
- `>`: Maximal version (e.g. `tokio>1.48`).
- `<`: Minimal version (e.g. `tokio<1.48`).
- `>=`: Maximal or equal version (e.g. `tokio>=1.48`).
- `<=`: Minimal or equal version (e.g. `tokio<=1.48`).
- `~`: Minimal version with some ability to update (e.g. `tokio~1`).
Features can be enabled by appending them with `+` (e.g. `clap+derive` or `clap+derive+cargo`.
To disable default features, prefix the first feature with an additional `+`(e.g. `ratatui++termion`
or `ratatui++termion+serde`).
# Examples
```sh
cargo temp anyhow
cargo temp tokio=1.48
cargo temp clap+derive
cargo temp https://github.com/rust-random/rand#thread_rng
cargo temp ssh://git@github.com/ratatui/ratatui.git#latest++termion
```"
))]
pub dependencies: Vec<Dependency>,
#[arg(long, short = 'l')]
pub lib: bool,
#[arg(long, short = 'e')]
pub edition: Option<String>,
#[arg(long = "name", short = 'n')]
pub project_name: Option<String>,
#[arg(long, short = 'b')]
pub bench: Option<Option<String>>,
#[arg(long = "worktree", short = 'w')]
pub worktree_branch: Option<Option<String>>,
#[arg(long, short = 'g')]
pub git: Option<String>,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_cli() {
use clap::CommandFactory;
Cli::command().debug_assert();
}
}