aboutsummaryrefslogtreecommitdiff
path: root/mling/src/cli/refresh.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-28 16:27:10 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-28 16:27:10 +0800
commit6a907b71f945bf49d27a001f279bf116ad7297d8 (patch)
tree021a01d1d4c1cf1439ed19aca65e45b247fba9d1 /mling/src/cli/refresh.rs
parent881e7399b2417c32fa996d94c6b389c1e06d8eb1 (diff)
Rename refresh command to install
Diffstat (limited to 'mling/src/cli/refresh.rs')
-rw-r--r--mling/src/cli/refresh.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/mling/src/cli/refresh.rs b/mling/src/cli/refresh.rs
deleted file mode 100644
index 368670e..0000000
--- a/mling/src/cli/refresh.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use mingling::{
- ShellContext, Suggest,
- macros::{chain, completion, dispatcher, pack, suggest},
- parser::Picker,
-};
-
-use crate::{ThisProgram, project_installer::install_all};
-
-dispatcher!("refresh", RefreshCommand => RefreshEntry);
-
-pack!(ResultRefreshCompleted = ());
-
-#[completion(RefreshEntry)]
-pub(crate) fn comp_refresh(ctx: &ShellContext) -> Suggest {
- if ctx.typing_argument() {
- return suggest! {
- "--clean": "Clean build artifacts before installation",
- "-c": "Clean build artifacts before installation",
- };
- }
- return suggest!();
-}
-
-#[chain]
-pub(crate) fn handle_refresh_entry(prev: RefreshEntry) -> NextProcess {
- let is_clean_before_build = Picker::new(prev.inner)
- .pick::<bool>(["--clean", "-c"])
- .unpack();
- let _ = install_all(is_clean_before_build);
-
- ResultRefreshCompleted::new(())
-}