diff options
| author | XiaoZhang <zxinmyth@gmail.com> | 2023-06-01 01:54:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-01 02:54:09 +0900 |
| commit | 3d7c54aca0c5d0c142f644b652da3a7290697a43 (patch) | |
| tree | d220668c9f65a10f3a2f8930f9c370910e9e4ac4 | |
| parent | docs(changelog): plugin workers (diff) | |
| download | sl0ppij-3d7c54aca0c5d0c142f644b652da3a7290697a43.tar.gz sl0ppij-3d7c54aca0c5d0c142f644b652da3a7290697a43.tar.xz sl0ppij-3d7c54aca0c5d0c142f644b652da3a7290697a43.zip | |
fix: cwd of newtab action (#2455)
| -rw-r--r-- | zellij-server/src/pty.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zellij-server/src/pty.rs b/zellij-server/src/pty.rs index ea2d4fe4..fb58aef8 100644 --- a/zellij-server/src/pty.rs +++ b/zellij-server/src/pty.rs @@ -742,7 +742,7 @@ impl Pty { } }); match run_instruction { - Some(Run::Command(command)) => { + Some(Run::Command(mut command)) => { let starts_held = command.hold_on_start; let hold_on_close = command.hold_on_close; let quit_cb = Box::new({ @@ -762,6 +762,11 @@ impl Pty { } } }); + if command.cwd.is_none() { + if let TerminalAction::RunCommand(cmd) = default_shell { + command.cwd = cmd.cwd; + } + } let cmd = TerminalAction::RunCommand(command.clone()); if starts_held { // we don't actually open a terminal in this case, just wait for the user to run it |
