Open current dir if no arguments provided
This commit is contained in:
parent
ef040c4277
commit
a54957ddf2
1 changed files with 5 additions and 1 deletions
|
|
@ -636,7 +636,11 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
|
|
||||||
if app.tab_model.iter().next().is_none() {
|
if app.tab_model.iter().next().is_none() {
|
||||||
commands.push(app.open_tab(Location::Path(home_dir())));
|
if let Ok(current_dir) = env::current_dir() {
|
||||||
|
commands.push(app.open_tab(Location::Path(current_dir)));
|
||||||
|
} else {
|
||||||
|
commands.push(app.open_tab(Location::Path(home_dir())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(app, Command::batch(commands))
|
(app, Command::batch(commands))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue