From 82d30986e6a8c8ec01775ba9f309dedc3c97d22a Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Fri, 20 Oct 2023 21:40:13 +0100 Subject: [PATCH] don't split terminal command --- lapce-proxy/src/terminal.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lapce-proxy/src/terminal.rs b/lapce-proxy/src/terminal.rs index 802dc801..52cde0ec 100644 --- a/lapce-proxy/src/terminal.rs +++ b/lapce-proxy/src/terminal.rs @@ -251,17 +251,13 @@ fn program(profile: &TerminalProfile) -> Option { } else { None } + } else if which::which(command).is_ok() { + Some(Program::WithArgs { + program: command.to_owned(), + args: Vec::new(), + }) } else { - let mut parts = command.split(' '); - let program = parts.next().unwrap(); - if which::which(program).is_ok() { - Some(Program::WithArgs { - program: program.to_string(), - args: parts.map(|p| p.to_string()).collect::>(), - }) - } else { - None - } + None } } else { None