-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
Improve Session Resurrection #3861
Comments
Have you looked into the env node? It can be use in the layout file before the layout node to set environment variables when using the layout. It can also be used in the config. |
Hi, thanks for pointing me in the right direction. I tried looking into the documentation webpage under |
I looked into the env node as you suggested but it doesn't seem to support running shell commands to obtain the environment variables to be run, can that be fixed? |
Also, just like how tab names can be specified in the layout file, can the same be done for session names? |
Specifying the name of the session is propably not supported, as it is assumed, that multiple sessions with the same layout can exist. I personaly am using a fish function for entering zellij most of the time, which sets the session name. You could also have a pane, that runs your setup commands. This is a hacky workaround, as that pane exists until you close it. Maybe you can kill it in your setup script though. |
In my usual workflow, I source a shell file that exports certain necessary environment variables to initialize the project correctly. After which, I launch a Zellij session. Now, if, say that the zellij session is terminated and I attempt to resurrect it, the session comes back to life with the layout and the commands that were previously run. Still, the environment variables that had been sourced before that session was launched (1st time and 2nd time) aren't accessible anymore. So, it would be a great addition if the variables could also be revived before resurrection or if the variables could be passed via a JSON/KDL file.
The text was updated successfully, but these errors were encountered: