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

Exiting out of zellij run does not release its $ZELLIJ_PANE_ID #2939

Open
flinesse opened this issue Nov 14, 2023 · 2 comments
Open

Exiting out of zellij run does not release its $ZELLIJ_PANE_ID #2939

flinesse opened this issue Nov 14, 2023 · 2 comments

Comments

@flinesse
Copy link

flinesse commented Nov 14, 2023

I was looking into ways to IDEify my editor (hx) with Zellij #2835, #2795 and came across a behavior I believe is errant:

91631c69-a480-4083-bcb3-4f65610c90ed

When you exit from zellij run through its intended means (via <Ctrl-c>/--close-on-exit), the $ZELLIJ_PANE_ID env variable does not get decremented as one would see from closing panes.

This behavior is also inconsistent with the documentation's description of zellij run:

-c, --close-on-exit ---- Close the pane immediately when its command exits

..<Ctrl-c> to close the pane.

I have not yet done enough code sleuthing but I believe the terminal_id's from which $ZELLIJ_PANE_ID is derived from is not being treated the same way when the run subshell is --close-on-exited vs. close-paneed.


ver: zellij 0.39.1

@jaeheonji
Copy link
Member

Great find! Thank you 😄

@imsnif
Copy link
Member

imsnif commented Nov 21, 2023

Indeed a good find, thank you! While I will not mind a fix here - just know that this is what I'd consider undefined behavior. We can't promise to stay consistent on this one - rather we can only promise to give unique PANE_IDs to each pane.

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

No branches or pull requests

3 participants