mirror of https://github.com/lapce/lapce.git
don't split terminal command
This commit is contained in:
parent
938ee96a8e
commit
82d30986e6
|
@ -251,17 +251,13 @@ fn program(profile: &TerminalProfile) -> Option<Program> {
|
|||
} 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::<Vec<String>>(),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Reference in New Issue