aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-02-07 10:39:51 +0100
committerGitHub <noreply@github.com>2024-02-07 10:39:51 +0100
commit7e549cdbd5e0df712419802f2d2517f82c34e4a7 (patch)
tree80e9073edefac6c4cf45b9dcbdc663dba3206ad8 /src/main.rs
parentdocs(changelog): welcome screen (diff)
downloadsl0ppij-7e549cdbd5e0df712419802f2d2517f82c34e4a7.tar.gz
sl0ppij-7e549cdbd5e0df712419802f2d2517f82c34e4a7.tar.xz
sl0ppij-7e549cdbd5e0df712419802f2d2517f82c34e4a7.zip
fix(cli): respect cwd in zellij run and zellij plugin (#3116)
* fix(cli): respect cwd in zellij run and zellij plugin commands * style(fmt): rustfmt * fix tests
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 7481bfc5..30770405 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,6 +31,7 @@ fn main() {
start_suspended,
})) = opts.command
{
+ let cwd = cwd.or_else(|| std::env::current_dir().ok());
let skip_plugin_cache = false; // N/A for this action
let command_cli_action = CliAction::NewPane {
command,
@@ -56,11 +57,12 @@ fn main() {
skip_plugin_cache,
})) = opts.command
{
+ let cwd = std::env::current_dir().ok();
let command_cli_action = CliAction::NewPane {
command: vec![],
plugin: Some(url),
direction: None,
- cwd: None,
+ cwd,
floating,
in_place,
name: None,