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 {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
} else {
|
} else if which::which(command).is_ok() {
|
||||||
let mut parts = command.split(' ');
|
|
||||||
let program = parts.next().unwrap();
|
|
||||||
if which::which(program).is_ok() {
|
|
||||||
Some(Program::WithArgs {
|
Some(Program::WithArgs {
|
||||||
program: program.to_string(),
|
program: command.to_owned(),
|
||||||
args: parts.map(|p| p.to_string()).collect::<Vec<String>>(),
|
args: Vec::new(),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue