]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
feat: add aliases for a few subcommands
authorErrorNoInternet <errornointernet@envs.net>
Fri, 9 Feb 2024 09:37:00 +0000 (17:37 +0800)
committerErrorNoInternet <errornointernet@envs.net>
Fri, 9 Feb 2024 09:37:01 +0000 (17:37 +0800)
src/commands/cmd_subvolume.rs
src/commands/mod.rs

index 6df8d0fcb5b9b2989adffcfe1ef3bd0f8594077b..c77eaacda57ca4916aa8b333bcd00730fd5e03b7 100644 (file)
@@ -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)]
index 76de7f86dea039b780cb4de20662df5fd28b380c..70fef82cdbe8425c96ec5b417212d182aa160d49 100644 (file)
@@ -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),
 }