feat: v0.2.4, add config subcommand
This commit is contained in:
@@ -2,6 +2,7 @@ extern crate core;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use rust_util::XResult;
|
||||
use crate::cmd_config::CmdConfig;
|
||||
|
||||
use crate::cmd_decrypt::CmdDecrypt;
|
||||
use crate::cmd_encrypt::CmdEncrypt;
|
||||
@@ -9,6 +10,7 @@ use crate::cmd_info::CmdInfo;
|
||||
use crate::cmd_version::CmdVersion;
|
||||
|
||||
mod util;
|
||||
mod util_piv;
|
||||
mod util_ecdh;
|
||||
mod util_p384;
|
||||
mod util_x25519;
|
||||
@@ -21,6 +23,7 @@ mod wrap_key;
|
||||
mod file;
|
||||
mod card;
|
||||
mod cmd_version;
|
||||
mod cmd_config;
|
||||
mod cmd_info;
|
||||
mod cmd_decrypt;
|
||||
mod cmd_encrypt;
|
||||
@@ -47,6 +50,9 @@ enum Commands {
|
||||
/// Show version
|
||||
#[command(short_flag = 'v')]
|
||||
Version(CmdVersion),
|
||||
/// Show Config
|
||||
#[command(short_flag = 'c')]
|
||||
Config(CmdConfig),
|
||||
}
|
||||
|
||||
fn main() -> XResult<()> {
|
||||
@@ -56,5 +62,6 @@ fn main() -> XResult<()> {
|
||||
Commands::Decrypt(cmd_decrypt) => cmd_decrypt::decrypt(cmd_decrypt),
|
||||
Commands::Info(cmd_info) => cmd_info::info(cmd_info),
|
||||
Commands::Version(cmd_version) => cmd_version::version(cmd_version),
|
||||
Commands::Config(cmd_config) => cmd_config::config(cmd_config),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user