diff options
author | Lloyd Bond | 2023-10-03 01:18:27 +0000 |
---|---|---|
committer | GitHub | 2023-10-03 01:18:27 +0000 |
commit | 75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b (patch) | |
tree | c563d1c0bd86d816f21e450e990b2c90ab1aa1b5 /helix-term/src/application.rs | |
parent | 1756ba443631b0eb6d93c089d3b13b13cd8ef28f (diff) |
enable starting hx with a working directory (#8223)
* added working path arg to cli and help menu
* improve working path cli arg handling
* enable hx to set the working path
* applied cargo formatting
* improved code from cargo clippy suggestion
* improved code from follow up review
* fix for -w <path> is set but args.files is empty
* improved formatting of --help output
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r-- | helix-term/src/application.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 3e6da5bb..7c23ddfe 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -156,6 +156,9 @@ impl Application { let editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys))); compositor.push(editor_view); + if let Some(path) = args.working_directory { + helix_loader::set_current_working_dir(path)? + } if args.load_tutor { let path = helix_loader::runtime_file(Path::new("tutor")); editor.open(&path, Action::VerticalSplit)?; |