wplug/bin/wplug.rs

26 lines
463 B
Rust
Raw Permalink Normal View History

2022-03-28 17:19:23 +04:00
use clap::{Parser, Subcommand};
2021-12-18 00:11:25 +04:00
2022-03-28 17:19:23 +04:00
#[derive(Debug, Parser)]
#[clap(author, version, about, long_about = None)]
#[clap(propagate_version = true)]
pub struct Args {
#[clap(subcommand)]
cmd: ArgsCoommans,
}
2021-12-18 00:11:25 +04:00
2022-03-28 17:19:23 +04:00
#[derive(Debug, Subcommand)]
pub enum ArgsCoommans {
Info,
List,
Search { query: String },
Publish,
Login,
Add { name: String },
Remove { name: String },
Update,
}
2021-12-18 00:11:25 +04:00
pub fn main() {
2022-03-28 17:19:23 +04:00
println!("{:?}", Args::parse());
2021-12-18 00:11:25 +04:00
}