Add status command
This commit is contained in:
13
src/cmd.rs
13
src/cmd.rs
@@ -26,6 +26,8 @@ pub enum SubCommand {
|
||||
Sync(Sync),
|
||||
#[clap(about = "Generate a repository configuration from an existing file tree")]
|
||||
Find(Find),
|
||||
#[clap(about = "Show status of configured repositories")]
|
||||
Status(OptionalConfig),
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -40,6 +42,17 @@ pub struct Sync {
|
||||
pub config: String,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
#[clap()]
|
||||
pub struct OptionalConfig {
|
||||
#[clap(
|
||||
short,
|
||||
long,
|
||||
about = "Path to the configuration file"
|
||||
)]
|
||||
pub config: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct Find {
|
||||
#[clap(about = "The path to search through")]
|
||||
|
||||
Reference in New Issue
Block a user