From: ErrorNoInternet Date: Fri, 9 Feb 2024 09:37:00 +0000 (+0800) Subject: feat: add aliases for a few subcommands X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4327e0681b205b52a045005f66541205401cf7b0;p=bcachefs-tools-debian feat: add aliases for a few subcommands --- diff --git a/src/commands/cmd_subvolume.rs b/src/commands/cmd_subvolume.rs index 6df8d0f..c77eaac 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 }, + + #[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 76de7f8..70fef82 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), }