mirror of
https://github.com/CompeyDev/ruck.git
synced 2025-01-09 20:19:09 +00:00
27 lines
580 B
Rust
27 lines
580 B
Rust
|
use std::path::PathBuf;
|
||
|
|
||
|
use clap::{AppSettings, Parser, Subcommand};
|
||
|
|
||
|
/// A fictional versioning CLI
|
||
|
#[derive(Parser)]
|
||
|
#[clap(name = "ruck")]
|
||
|
#[clap(about = "Croc in rust", long_about = None)]
|
||
|
pub struct Cli {
|
||
|
#[clap(subcommand)]
|
||
|
pub command: Commands,
|
||
|
}
|
||
|
|
||
|
#[derive(Subcommand)]
|
||
|
pub enum Commands {
|
||
|
#[clap(setting(AppSettings::ArgRequiredElseHelp))]
|
||
|
Send {
|
||
|
#[clap(required = true, parse(from_os_str))]
|
||
|
paths: Vec<PathBuf>,
|
||
|
},
|
||
|
#[clap(setting(AppSettings::ArgRequiredElseHelp))]
|
||
|
Receive {
|
||
|
password: String,
|
||
|
},
|
||
|
Relay {},
|
||
|
}
|