zellij-org / zellij

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

using cwd parameter is inconsistent #2964

Open uncomfyhalomacro opened 1 year ago

uncomfyhalomacro commented 1 year ago

Using zellij version 0.38 and latest 0.39, I got so confused when running the following commands

zellij action new-pane --cwd ~/Documents

This command will not set the current working directory to ~/Documents whereas doing

zellij action new-pane --cwd ~/Documents -- $SHELL

has set the current working directory correctly.

The same could be said to new-tab as well.

zellij action new-tab --cwd ~/Documents

This will error with the message

error: The following required arguments were not provided:
    --layout <LAYOUT>

USAGE:
    zellij action new-tab --layout <LAYOUT> --cwd <CWD>

For more information try --help

So the workaround works

zellij action new-tab --layout default --cwd ~/Documents
Sawangg commented 3 days ago

The workaround you provided for tabs doesn't seem to work in zellij 0.41.2. Seems related to issue #2766. I couldn't find a way to open a new tab with a custom cwd