Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cwd does not update as expected #4023

Open
cipherquax opened this issue Feb 25, 2025 · 0 comments
Open

Cwd does not update as expected #4023

cipherquax opened this issue Feb 25, 2025 · 0 comments

Comments

@cipherquax
Copy link

Basic information

zellij --version: 0.41.2

stty size: 29 104

uname -av or ver(Windows): Linux fedora 6.12.15-200.fc41.x86_64

Issue description

After using Resurrection mechanism (but also after load the layout from the file), the current directory does not seem to be saved correctly.

Here is a step-by-step reproduction:

  1. Create a new session and enter directory x.
  2. Use the shortcut Ctrl+Q to quit the session.
  3. Reattach to the session you just left, and you will still be in directory x.
  4. Now change the directory to y.
  5. Use Ctrl+Q again and reattach to the session.
  6. Upon reattachment, you will still be in directory x, not y.

Minimal reproduction

  • Create a layout file (e.g., layout.zellij) with the following content:
layout {
    tab name="Tab 1" {
        pane size=1 borderless=true {
            plugin location="zellij:tab-bar"
        }
        pane cwd="/x"
    }
}
  • Launch Zellij using the custom layout:

zellij --layout layout.zellij

  • Within the session:

    • Verify that you are in directory /x.
    • Change the directory to /y.
    • Optionally, run a command such as pwd to confirm you are in /y.
  • Execute command:

zellij action dump-layout | grep cwd

  • Observation: The output still shows cwd="/x", even though the working directory was changed to /y.

Other relevant information

  • If you simplify the layout to only:
layout {
    tab name="Tab 1" {
        pane cwd="/x"
    }
}

the issue does not occur. This indicates that the inclusion of an extra pane (such as the plugin pane) may be related to the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant