Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnvironment variable not set when launching session from tmux #184
Comments
|
I have noticed the same issue and I think it is due to the workspace being built in the current (or non-existing when outside tmux) session instead of the new one. |
|
I've found a bug in libtmux which is causing this, @romabysen is correct. So I will try to fix libtmux and it should magically fix tmuxp. |
|
tmux-python/libtmux#65 has fixed this for me locally, so this should be fixed with the next version of libtmux. |
|
@askedrelic if you're around, try seeing if |
|
tmuxp 1.3.2 is live |
|
tmuxp 1.3.2 fixes this for me. My use case for this has been restarting a tmuxp session, while I'm currently using it. I setup a bunch of ssh connections and restarting the whole session has always seemed like the easiest thing for me: tmux-restart() {
# kill client incase it exists
tmux kill-session -t temp || TRUE
# create detached session with commands
tmux new-session -s temp -d 'sleep 1 && tmux kill-session -t dev && tmuxp load dev -y && tmux kill-session temp'
tmux switch-client -t temp;
} |
|
Indeed, tmuxp 1.3.2 seems to have fixed it. Thanks! |
Hello,
I have several tmuxp configuration files using
environmentto pass an env variable to the created session.When I launch them from a terminal, the environment variables are set. But when I launch them from a running tmux session they are not.
Do you have idea what's causing this behavior?
Failing testcase
Running
tmuxp load -y test.ymlshowsFOO=bar, whereas launching the same command from a tmux session doesn't.