mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-05 02:09:27 +02:00
22 lines
698 B
Rust
22 lines
698 B
Rust
use clap::{App, SubCommand};
|
|
|
|
use crate::cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArg};
|
|
|
|
/// The params command definition.
|
|
pub struct CmdParams;
|
|
|
|
impl CmdParams {
|
|
pub fn build<'a, 'b>() -> App<'a, 'b> {
|
|
// Create a list of parameter arguments, of which one is required
|
|
let param_args = [ArgDownloadLimit::name()];
|
|
|
|
SubCommand::with_name("parameters")
|
|
.about("Change parameters of a shared file")
|
|
.visible_alias("params")
|
|
.alias("param")
|
|
.alias("parameter")
|
|
.arg(ArgUrl::build())
|
|
.arg(ArgOwner::build())
|
|
.arg(ArgDownloadLimit::build().required_unless_one(¶m_args))
|
|
}
|
|
}
|