Test message 123!
This commit is contained in:
1 parent
4cf726709f
commit
d4fdc9890a
52 files changed
+5537
-277
No files matched your search
+30
-44
@@ -1,51 +1,37 @@
|
||||
use crate::cli::{Cli, Commands};
|
||||
use anyhow::Result;
|
||||
|
||||
const NOT_YET: &str = "\
|
||||
This CLI command is not yet implemented.
|
||||
Launch the TUI with: fxg
|
||||
";
|
||||
|
||||
pub async fn run(cli: Cli) -> Result<()> {
|
||||
if cli.debug { crate::debug::enable(); }
|
||||
let cfg = crate::config::load_config()?;
|
||||
|
||||
match cli.command {
|
||||
Commands::Config => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::config::run(cfg).await
|
||||
}
|
||||
Commands::Auth(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::auth::run(args, &cfg).await
|
||||
}
|
||||
Commands::Init(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::init::run(args, &cfg).await
|
||||
}
|
||||
Commands::Status(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::status::run(args, &cfg).await
|
||||
}
|
||||
Commands::Sync(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::sync::run(args, &cfg).await
|
||||
}
|
||||
Commands::Release(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::release::run(args, &cfg).await
|
||||
}
|
||||
Commands::Refactor(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::refactor::run(args, &cfg).await
|
||||
}
|
||||
Commands::Stats(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::stats::run(args, &cfg).await
|
||||
}
|
||||
Commands::Workspace(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::workspace::run(args, &cfg).await
|
||||
}
|
||||
Commands::Summary(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::summary::run(args, &cfg).await
|
||||
}
|
||||
Commands::Adopt(args) => {
|
||||
let cfg = crate::config::load_config()?;
|
||||
crate::adopt::run(args, &cfg).await
|
||||
}
|
||||
// ── no subcommand → TUI hub ──
|
||||
None => crate::status::run(
|
||||
crate::cli::StatusArgs { repo: None, workspace: None, filter: None },
|
||||
&cfg,
|
||||
).await,
|
||||
|
||||
// ── always-on: config + auth ──
|
||||
Some(Commands::Config) => crate::config::run(cfg).await,
|
||||
Some(Commands::Auth(args)) => crate::auth::run(args, &cfg).await,
|
||||
|
||||
// ── everything else: stub ──
|
||||
Some(Commands::Init(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Status(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Sync(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Release(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Refactor(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Stats(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Workspace(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Summary(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Adopt(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Manage(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
Some(Commands::Util(_)) => { eprintln!("{}", NOT_YET); Ok(()) }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user