Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When creating new tab using
Ctrl-T N
key binding, the panes in the new tab should inherit the cwd of the current pane. However not all panes respect that.My layout
reproduction steps
Ctrl-T N
Here you can see that the panes in the new tab are in different cwds. the focused pane is in the old cwd while the non-focused pane is in the new(correct) cwd.
My experiment tells that the issue is not about focus, instead it is the
command="bash"
option that prevents the tab from knowing the right cwd.Solution
I am new to zellij and haven't looked into every corner, so I still do not fully understand the issue. For example, I have no clue why the pane without command is in the right cwd. Please point out the missing parts if any.
Here I pass the cwd option to the
NewTab
command and the problem is fixed.