diff options
Diffstat (limited to 'mling/src/cli/install.rs')
| -rw-r--r-- | mling/src/cli/install.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/mling/src/cli/install.rs b/mling/src/cli/install.rs deleted file mode 100644 index cca7483..0000000 --- a/mling/src/cli/install.rs +++ /dev/null @@ -1,32 +0,0 @@ -use mingling::{ - ShellContext, Suggest, - macros::{chain, completion, dispatcher, pack, suggest}, - parser::Picker, -}; - -use crate::{Next, project_installer::install_all}; - -dispatcher!("install", InstallCommand => InstallEntry); - -pack!(ResultInstallCompleted = ()); - -#[completion(InstallEntry)] -pub(crate) fn comp_install(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_install_entry(prev: InstallEntry) -> Next { - let is_clean_before_build = Picker::new(prev.inner) - .pick::<bool>(["--clean", "-c"]) - .unpack(); - let _ = install_all(is_clean_before_build); - - ResultInstallCompleted::new(()) -} |
