From c28e8021f7afcb7ddf1de98d345df911777dcc20 Mon Sep 17 00:00:00 2001 From: Deng Guangxing Date: Sat, 3 Jul 2021 23:29:01 +0800 Subject: [PATCH] add initial dysche-cli to repository dysche-cli is supposed to be developed in rust. here we just add a very simple rust project here Signed-off-by: Deng Guangxing --- cli/Cargo.toml | 9 +++++++++ cli/src/main.rs | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cli/Cargo.toml create mode 100644 cli/src/main.rs diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 0000000..57995b2 --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "dysche-cli" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = "~2.27.0" diff --git a/cli/src/main.rs b/cli/src/main.rs new file mode 100644 index 0000000..5704cc2 --- /dev/null +++ b/cli/src/main.rs @@ -0,0 +1,17 @@ +extern crate clap; +use clap::clap_app; + +fn main() { + let _matches = clap_app!(dyschecli => + (version: "0.1.0") + (author: "Guangxing Deng. ") + (about: "Cli tools for dysche partition management") + (@arg help: -h ... "Show dysche-cli help infos") + (@subcommand list => + (about: "Show availible partitions") + (version: "0.1.0") + (author: "Guangxing Deng. ") + (@arg verbose: -v --verbose "Print partiton information verbosely") + ) + ).get_matches(); +} -- Gitee