modadd;modlist;modnew;modremove;usestd::path::PathBuf;useadd::add;useanyhow::Result;useclap::Subcommand;uselist::list;usenew::new;useremove::remove;usecrate::core::Ctx;#[derive(Subcommand)]pub(crate)enumWsCommands{///Create a new cluster
#[clap(alias("n"))]
New { name:Option<String>},///Add a folder to an existing cluster
#[clap(alias("a"))]
Add {#[clap(short, long)]
name:Option<String>,
path: PathBuf,},///Remove a folder from a cluster
#[clap(alias("r"))]
Remove { name:String},///List the members of a cluster
#[clap(alias("l"),alias("ls"))]
List {},}///Handle cluster subcommands
pub(crate)fncluster(ctx:&mut Ctx, command: WsCommands)->Result<()>{match command {WsCommands::New { name }=>new(ctx, name),WsCommands::Add { name, path }=>add(ctx, name, path),WsCommands::Remove { name }=>remove(ctx, name),WsCommands::List {}=>list(ctx),}}