Discussion:
How to access session environment variable from running window
Enrico Ghirardi
2015-05-06 15:31:52 UTC
Permalink
Hi,

is there a way to access session environment variables from an already running window?

In my example I:
1- create a session then detach from it
2- start a new shell set an environment variable (the variable is included in the update-environment string)
3- attach to old session from this shell 
4- variable is visible in the session environment if I type “tmux show-environment” but I can’t access it from
    currently running windows, must create a new window to access it.

Many thanks,

-- 
Enrico Ghirardi
Nicholas Marriott
2015-05-06 18:51:00 UTC
Permalink
tmux can't affect variables in panes that already contain a running process. The only way is to set them yourself (perhaps by getting the values from tmux getenv).

-------- Original message --------
From: Enrico Ghirardi <***@choco.me>
Date:06/05/2015 16:31 (GMT+00:00)
To: tmux-users <tmux-***@lists.sourceforge.net>
Subject: How to access session environment variable from running window

Hi,

is there a way to access session environment variables from an already running window?

In my example I:
1- create a session then detach from it
2- start a new shell set an environment variable (the variable is included in the update-environment string)
3- attach to old session from this shell 
4- variable is visible in the session environment if I type “tmux show-environment” but I can’t access it from
    currently running windows, must create a new window to access it.

Many thanks,

-- 
Enrico Ghirardi

Loading...