zellij
zellij copied to clipboard
CWD never changes when reattaching back to an exited session
Basic information
zellij --version:
zellij 0.39.0
stty size:
28 72
uname -av or ver(Windows):
Linux domu 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Further information Update: I now got it down to just doing these steps below. So I updated all the information below and removed all the unneeded information.
It seems like creating it for the first time will allow cwd to be changed by cd. However, by doing these following steps, you can get cwd to not change its directory at all.
Here are the steps to reproduce it:
zellij attach --create any_session_name- Exit from that session.
zellij attach --create session_name_that_you_exited_from- Use the
cdcommand to change to a different directory in a tab - Exit from that session.
zellij attach --create session_name_that_you_exited_from- You will notice that the current working directory has not changed.
I fixed the script though the issue still happens. What's annoying is that the tab bar and the status bar has completely disappeared now. Which makes this hard to debug. For some odd reason, navigating to a certain tab will sometimes wipe everything in that tab which causes the status bar and tab bar to appear. Though this seems like a separate issue from what im having.
Actually now testing this further, it seems like its happening to all sessions now?
layout {
cwd "/home/nukiloco/dotfiles"
tab name="Tab #1" hide_floating_panes=true {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane cwd="/home/nukiloco/dotfiles" focus=true
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab name="Tab #2" hide_floating_panes=true {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane cwd="/home/nukiloco/dotfiles" focus=true
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab name="home dir" hide_floating_panes=true {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane cwd="/home/nukiloco/dotfiles" focus=true
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab name="Tab #4" focus=true hide_floating_panes=true {
}
new_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane cwd="/home/nukiloco/dotfiles"
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
}
The plugins disappearing look like they are happening to all sessions i use zellij attach --create SESSION_NAME.
Zellij not changing its directory seems like its happening on all sessions now though these are just by running zellij, then resurrecting them. I have not used my own script at this point now.
So it looks like I can change the cd on a new session, however if I quit from it, and then attach back to it, changing the directory will no longer save. These new sessions that im creating just from running zellij are not using symlinks.
I changed the title of this to more reflect of whats currently happening. I guess I will make another bug report about the tab information being randomly wiped for no reason?
Happens on zellij 0.39.2
I can reproduce this on version 0.40.0 as well.
It's happening to me on 0.40.1