zellij
zellij copied to clipboard
Feature/go to tab name cwd
when using --create flag, allow cwd to be specified if tab needs to be created.
This will be very useful when using in a script to open a new tab per project.
Example:
zellij action go-to-tab-name --create test --cwd ~/.local/bin
when a tab named test
does not exist, should use ~/.local/bin
as the start directory.
This is my first PR, and first time attempting to contribute to OSS. I really enjoy this project, and would love any recommendations / comments / concerns!
Thank you for your time!
Great initiative! But why not make it available for all entities - i.e panes and windows too.
We can maybe pass the-cwd
option after the main zellij
command and set it globally so that every entity will be able to consume it if it wants to:
zellij --cwd /dev/null action ...
The action command will then make it available for everyone to consume.
Great initiative! But why not make it available for all entities - i.e panes and windows too. We can maybe pass the-cwd option after the main zellij command and set it globally so that every entity will be able to consume it if it wants to:
zellij --cwd /dev/null action ...
The action command will then make it available for everyone to consume.
@silicakes It would make sense to have it available in other cases too like for creating panes and such, but I am not sure about the globally, that would seem to indicate that all commands have a use for the flag. But I do see your point, once I have a second I will think about how that might work 👍🏼!
Great initiative! But why not make it available for all entities - i.e panes and windows too. We can maybe pass the-cwd option after the main zellij command and set it globally so that every entity will be able to consume it if it wants to: zellij --cwd /dev/null action ... The action command will then make it available for everyone to consume.
@silicakes It would make sense to have it available in other cases too like for creating panes and such, but I am not sure about the globally, that would seem to indicate that all commands have a use for the flag. But I do see your point, once I have a second I will think about how that might work 👍🏼!
Oh this should totally be optional and just use the sessions root as default (like today), the main point is about having the other members doing it too. Thanks!
@silicakes After looking at the existing commands I think that only setting this flag for the one action makes sense. Adding it as a base flag that is optional might be confusing since it would be a no-op on commands that are not using the value.
existing ex:
Like if the user were to run zellij --cwd ~/.local/ action resize
, and the cwd was not used it might not be clear its not a feature available on that action. I might be misunderstanding the idea though!
@pitoniak32
I get your point. I wish the api would look something like:
> zellij new pane/tab/window/session -c your/path/to/stuff
check this out: https://github.com/tmux/tmux/wiki/Advanced-Use#working-directories
Let me know if it clarifies things for you or whether it can be bound to all three (four?) options