mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-09 00:00:17 +03:00
Merge pull request #236 from ErrorNoInternet/subcommand-aliases
Add a few subcommand aliases
This commit is contained in:
commit
9e6d9560d0
@ -3,7 +3,7 @@ use clap_complete::{generate, Generator, Shell};
|
||||
use std::io;
|
||||
|
||||
/// Generate shell completions
|
||||
#[derive(clap::Parser, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct Cli {
|
||||
shell: Shell,
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ pub struct Cli {
|
||||
mode: Mode,
|
||||
|
||||
/// Check (fsck) the filesystem first
|
||||
#[arg(short, long, default_value_t=false)]
|
||||
#[arg(short, long)]
|
||||
fsck: bool,
|
||||
|
||||
/// Force color on/off. Default: autodetect tty
|
||||
|
||||
@ -14,18 +14,22 @@ 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 = 'r')]
|
||||
#[arg(long, short)]
|
||||
read_only: bool,
|
||||
source: Option<PathBuf>,
|
||||
dest: PathBuf
|
||||
|
||||
@ -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),
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user