Add version and description to CLI

This commit is contained in:
fabianlindfors 2022-02-03 23:26:50 +01:00
parent ef6fe64918
commit 033ac5b2f1
3 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
typetag = "0.1.7"
anyhow = { version = "1.0.44", features = ["backtrace"] }
clap = { version = "3.0.0", features = ["derive"] }
clap = { version = "3.0.14", features = ["derive"] }
toml = "0.5"
version = "3.0.0"
colored = "2"

View File

@ -12,12 +12,14 @@ use reshape::{
use serde::{Deserialize, Serialize};
#[derive(Parser)]
#[clap(name = "Reshape", version, about)]
struct Opts {
#[clap(subcommand)]
cmd: Command,
}
#[derive(Parser)]
#[clap(about)]
enum Command {
Migrate(MigrateOptions),
Complete(ConnectionOptions),
@ -28,6 +30,7 @@ enum Command {
#[derive(Args)]
struct MigrateOptions {
// Some comment
#[clap(long, short)]
complete: bool,
#[clap(flatten)]