From a54957ddf23d1dcf4a63cee3a66baf82425f62ae Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 4 Mar 2024 10:30:59 -0700 Subject: [PATCH] Open current dir if no arguments provided --- src/app.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index d168bd7..ea8373a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -636,7 +636,11 @@ impl Application for App { } 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))