feat: add aliases for a few subcommands

This commit is contained in:
ErrorNoInternet 2024-02-09 17:37:00 +08:00
parent 428948e120
commit 4327e0681b
No known key found for this signature in database
GPG Key ID: 2486BFB7B1E6A4A3
2 changed files with 6 additions and 1 deletions

View 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)]

View 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),
}