diff options
author | ErrorNoInternet <errornointernet@envs.net> | 2024-02-09 17:37:00 +0800 |
---|---|---|
committer | ErrorNoInternet <errornointernet@envs.net> | 2024-02-09 17:37:01 +0800 |
commit | 4327e0681b205b52a045005f66541205401cf7b0 (patch) | |
tree | bfbfb68abcf2caee31707e6b1a3f977528017e63 | |
parent | 428948e1208995bacc5dfd86de6e8a41fb7d3238 (diff) |
feat: add aliases for a few subcommands
-rw-r--r-- | src/commands/cmd_subvolume.rs | 6 | ||||
-rw-r--r-- | src/commands/mod.rs | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/cmd_subvolume.rs b/src/commands/cmd_subvolume.rs index 6df8d0fc..c77eaacd 100644 --- a/src/commands/cmd_subvolume.rs +++ b/src/commands/cmd_subvolume.rs @@ -14,15 +14,19 @@ pub struct Cli { /// Subvolumes-related commands #[derive(Subcommand, Debug)] enum Subcommands { + #[command(visible_aliases = ["new"])] Create { /// Paths targets: Vec<PathBuf> }, + + #[command(visible_aliases = ["del"])] Delete { /// Path target: PathBuf }, - #[command(allow_missing_positional = true)] + + #[command(allow_missing_positional = true, visible_aliases = ["snap"])] Snapshot { /// Make snapshot read only #[arg(long, short)] diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 76de7f86..70fef82c 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -18,6 +18,7 @@ enum Subcommands { List(cmd_list::Cli), Mount(cmd_mount::Cli), Completions(cmd_completions::Cli), + #[command(visible_aliases = ["subvol"])] Subvolume(cmd_subvolume::Cli), } |