mirror of https://github.com/lapce/lapce.git
terminal default to HOME
This commit is contained in:
parent
8ac6f6b909
commit
746f4c4aa3
|
@ -68,7 +68,8 @@ pub fn new(
|
||||||
) -> Terminal {
|
) -> Terminal {
|
||||||
let poll = mio::Poll::new().unwrap();
|
let poll = mio::Poll::new().unwrap();
|
||||||
let mut config = TermConfig::default();
|
let mut config = TermConfig::default();
|
||||||
config.working_directory = cwd;
|
config.working_directory =
|
||||||
|
cwd.or_else(|| std::env::var("HOME").ok().map(|h| PathBuf::from(h)));
|
||||||
config.shell = std::env::var("SHELL").ok().map(|shell| Program::WithArgs {
|
config.shell = std::env::var("SHELL").ok().map(|shell| Program::WithArgs {
|
||||||
program: shell.to_string(),
|
program: shell.to_string(),
|
||||||
args: vec!["-l".to_string()],
|
args: vec!["-l".to_string()],
|
||||||
|
|
Loading…
Reference in New Issue