Skip to content

Commit

Permalink
feat: 支持别名
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnotech committed Aug 1, 2024
1 parent d734d31 commit 90328ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/types/cli/mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub enum ActionMirror {
/// Mirror name
name: String,
},
/// List added mirrors
/// List added mirrors [alias 'ls']
#[clap(alias = "ls")]
List,
}
11 changes: 7 additions & 4 deletions src/types/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub use self::config::ActionConfig;
pub use self::mirror::ActionMirror;
use clap::{Parser, Subcommand};

/// [Alpha] Edgeless Package Tool (ept) for Edgeless Next-Generation Packages (nep)
/// Edgeless Package Tool (ept) for Next-Generation Edgeless Packages (nep)
#[derive(Parser, Debug)]
#[command(version)]
pub struct Args {
Expand Down Expand Up @@ -34,7 +34,8 @@ pub struct Args {

#[derive(Subcommand, Debug)]
pub enum Action {
/// Install a package
/// Install a package [alias 'i' 'add']
#[clap(aliases = &["i", "add"])]
Install {
/// Package matcher(expect pattern ((MIRROR/)SCOPE/)NAME(@SEMVER))or Nep package url or Nep package local path
package: String,
Expand All @@ -46,7 +47,8 @@ pub enum Action {
package: Option<String>,
},

/// Uninstall a package
/// Uninstall a package [alias 'remove']
#[clap(alias = "remove")]
Uninstall {
/// Package matcher, expect pattern (SCOPE/)NAME
package_matcher: String,
Expand All @@ -64,7 +66,8 @@ pub enum Action {
package_matcher: String,
},

/// List information of installed packages
/// List information of installed packages [alias 'ls']
#[clap(alias = "ls")]
List,

/// Get meta data of given package
Expand Down

0 comments on commit 90328ee

Please sign in to comment.