From 6bd344793e5c2e84361475d6e221007ef21faaad Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 25 Feb 2026 10:58:39 +0800 Subject: Remove ambiguous command error and auto-select longest match --- src/bin/jvn.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/bin') diff --git a/src/bin/jvn.rs b/src/bin/jvn.rs index 1dbc517..7ec1f4d 100644 --- a/src/bin/jvn.rs +++ b/src/bin/jvn.rs @@ -101,18 +101,6 @@ async fn main() { CmdProcessError::NoMatchingCommand => { handle_no_matching_command_error(args); } - CmdProcessError::AmbiguousCommand(nodes) => { - let nodes_list = nodes - .iter() - .enumerate() - .map(|(i, node)| format!("{}. {}", i + 1, node)) - .collect::>() - .join("\n"); - eprintln!( - "{}", - md(t!("process_error.ambiguous_command", nodes = nodes_list)) - ); - } CmdProcessError::ParseError(help) => { if help.trim().len() < 1 { eprintln!("{}", md(t!("process_error.parse_error"))); -- cgit