Skip to content

Commit

Permalink
fix: cwd of newtab action (#2455)
Browse files Browse the repository at this point in the history
  • Loading branch information
onichandame authored May 31, 2023
1 parent df0c7f1 commit 3d7c54a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zellij-server/src/pty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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
Expand Down

0 comments on commit 3d7c54a

Please sign in to comment.