Move repo-tree functionality into own subcommand

This commit is contained in:
2021-11-24 17:22:10 +01:00
parent e516a652f5
commit 0c6a4a72ef
2 changed files with 66 additions and 52 deletions

View File

@@ -19,6 +19,20 @@ pub struct Opts {
#[derive(Parser)]
pub enum SubCommand {
#[clap(about = "Manage repositories")]
Repos(Repos),
#[clap(visible_alias = "wt", about = "Manage worktrees")]
Worktree(Worktree),
}
#[derive(Parser)]
pub struct Repos {
#[clap(subcommand, name = "action")]
pub action: ReposAction,
}
#[derive(Parser)]
pub enum ReposAction {
#[clap(
visible_alias = "run",
about = "Synchronize the repositories to the configured values"
@@ -28,8 +42,6 @@ pub enum SubCommand {
Find(Find),
#[clap(about = "Show status of configured repositories")]
Status(OptionalConfig),
#[clap(visible_alias = "wt", about = "Manage worktrees")]
Worktree(Worktree),
}
#[derive(Parser)]