Set CWD when editor is started with a directory (#849)
commitc71b49497d8fc8ee487b7cfeafb7392b71a13d17
authorOmnikar <omkar.subramaniam@icloud.com>
dateFri 15 Oct 2021, 21:04 (5 years ago)
parent4d07eaa
helix-term/src/application.rs+1
@@ -100,6 +100,7 @@ impl Application {
100100 if !args.files.is_empty() {
101101 let first = &args.files[0]; // we know it's not empty
102102 if first.is_dir() {
103+ std::env::set_current_dir(&first)?;
103104 editor.new_file(Action::VerticalSplit);
104105 compositor.push(Box::new(ui::file_picker(first.clone())));
105106 } else {