ruck/src/cli.rs

28 lines
606 B
Rust
Raw Normal View History

2022-02-07 00:54:36 +00:00
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>,
2022-02-10 19:52:28 +00:00
password: String,
2022-02-07 00:54:36 +00:00
},
#[clap(setting(AppSettings::ArgRequiredElseHelp))]
Receive {
password: String,
},
Relay {},
}