diff --git a/src/cli.rs b/src/cli.rs index e1bb4e1..9a8aedc 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,6 +2,7 @@ pub mod cmd; pub mod opts; pub mod sink; +use self::cmd::project::Error as ProjectError; use self::cmd::{CmdError, Context}; use self::opts::{MainOpts, SubCommand}; use clap::CommandFactory; @@ -19,6 +20,10 @@ pub async fn execute_cmd(opts: MainOpts) -> Result<(), CmdError> { input.print_completions(&mut app).await; } SubCommand::Project(input) => input.exec(ctx).await?, + SubCommand::Clone(input) => input + .exec(ctx) + .await + .map_err(|source| ProjectError::Clone { source })?, #[cfg(feature = "user-doc")] SubCommand::UserDoc(input) => input.exec(ctx).await?, diff --git a/src/cli/opts.rs b/src/cli/opts.rs index 085c05b..0f461c7 100644 --- a/src/cli/opts.rs +++ b/src/cli/opts.rs @@ -54,6 +54,10 @@ pub enum SubCommand { #[command()] Project(project::Input), + /// Clone a project. (Shortcut for 'project clone') + #[command()] + Clone(project::clone::Input), + #[cfg(feature = "user-doc")] UserDoc(userdoc::Input), }