mirror of https://github.com/lapce/lapce.git
don't split terminal command
This commit is contained in:
parent
938ee96a8e
commit
82d30986e6
|
@ -251,18 +251,14 @@ fn program(profile: &TerminalProfile) -> Option<Program> {
|
|||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
let mut parts = command.split(' ');
|
||||
let program = parts.next().unwrap();
|
||||
if which::which(program).is_ok() {
|
||||
} else if which::which(command).is_ok() {
|
||||
Some(Program::WithArgs {
|
||||
program: program.to_string(),
|
||||
args: parts.map(|p| p.to_string()).collect::<Vec<String>>(),
|
||||
program: command.to_owned(),
|
||||
args: Vec::new(),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue