From f7ce99550595915efb3d3f7774095976cb3b763b Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Tue, 9 Jun 2026 17:12:50 +0800 Subject: Add COMPLETION_SUBCOMMAND and is_completing method --- mling/src/cli.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mling/src') diff --git a/mling/src/cli.rs b/mling/src/cli.rs index 6a4c7d8..6dc7b9e 100644 --- a/mling/src/cli.rs +++ b/mling/src/cli.rs @@ -75,16 +75,14 @@ pub fn run() { }); // Manifest Path Check - program.with_hook(ProgramHook::empty().on_post_dispatch(|c| match c { - // Skip completion (bypass completion) - ThisProgram::CompletionContext => {} - _ => { + if !program.is_completing() { + program.with_hook(ProgramHook::empty().on_post_dispatch(|_| { let p = ThisProgram::this(); p.modify_res(|manifest_path: &mut ResManifestPath| { manifest_path.resolved = Some(resolve_manifest_path(manifest_path.raw.clone())); }); - } - })); + })); + } // Execute let quiet = program.stdout_setting.quiet; -- cgit