diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-28 16:27:10 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-28 16:27:10 +0800 |
| commit | 6a907b71f945bf49d27a001f279bf116ad7297d8 (patch) | |
| tree | 021a01d1d4c1cf1439ed19aca65e45b247fba9d1 /mling/src | |
| parent | 881e7399b2417c32fa996d94c6b389c1e06d8eb1 (diff) | |
Rename refresh command to install
Diffstat (limited to 'mling/src')
| -rw-r--r-- | mling/src/cli.rs | 6 | ||||
| -rw-r--r-- | mling/src/cli/install.rs (renamed from mling/src/cli/refresh.rs) | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mling/src/cli.rs b/mling/src/cli.rs index e0dfbe6..ed5dd06 100644 --- a/mling/src/cli.rs +++ b/mling/src/cli.rs @@ -14,8 +14,8 @@ pub use namespace_mgr::*; pub mod read; pub use read::*; -pub mod refresh; -pub use refresh::*; +pub mod install; +pub use install::*; pub fn cli_entry() { let mut program = ThisProgram::new(); @@ -31,7 +31,7 @@ pub fn cli_entry() { SetTrustNamespaceCommand, RemoveNamespaceCommand, )); - program.with_dispatcher(RefreshCommand); + program.with_dispatcher(InstallCommand); program.with_dispatchers(( ReadTargetDirCommand, ReadWorkspaceRootCommand, diff --git a/mling/src/cli/refresh.rs b/mling/src/cli/install.rs index 368670e..dc2cf57 100644 --- a/mling/src/cli/refresh.rs +++ b/mling/src/cli/install.rs @@ -6,12 +6,12 @@ use mingling::{ use crate::{ThisProgram, project_installer::install_all}; -dispatcher!("refresh", RefreshCommand => RefreshEntry); +dispatcher!("install", InstallCommand => InstallEntry); -pack!(ResultRefreshCompleted = ()); +pack!(ResultInstallCompleted = ()); -#[completion(RefreshEntry)] -pub(crate) fn comp_refresh(ctx: &ShellContext) -> Suggest { +#[completion(InstallEntry)] +pub(crate) fn comp_install(ctx: &ShellContext) -> Suggest { if ctx.typing_argument() { return suggest! { "--clean": "Clean build artifacts before installation", @@ -22,11 +22,11 @@ pub(crate) fn comp_refresh(ctx: &ShellContext) -> Suggest { } #[chain] -pub(crate) fn handle_refresh_entry(prev: RefreshEntry) -> NextProcess { +pub(crate) fn handle_install_entry(prev: InstallEntry) -> NextProcess { let is_clean_before_build = Picker::new(prev.inner) .pick::<bool>(["--clean", "-c"]) .unpack(); let _ = install_all(is_clean_before_build); - ResultRefreshCompleted::new(()) + ResultInstallCompleted::new(()) } |
