zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.42k stars 611 forks source link

floating_panes does not inherit cwd from tab #3364

Open scabala opened 1 month ago

scabala commented 1 month ago

2. Issues with the Zellij UI / behavior / crash

Issue description

When defining floating_panes inside tab, panes in floating_panes do not inherit cwd from tab, as others parts of layout do.

Minimal reproduction

Having following layout:

layout cwd="/tmp" {
    tab name="Tab #1" cwd="/mnt" {
        pane name="Pane #1" {

        }
        floating_panes {
            pane name="Floating pane #1"
        }
    }

}

run it via zellij -l ./layout.kdl, nomal pane (Pane #1) will have working directory set to /mnt. However, Floating pane #1 will have current working directory set to /tmp.

I think user expectation would be to have current working directory set for floating panes to /mnt.

Other relevant information

rockboynton commented 1 month ago

just noticed this as well. And it doesn't seem to just be within a layout. Even if I run the command line action it ignores the cwd option zellij action new-pane --cwd=/home/rboynton/sources --floating just starts at /home/rboynton