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