Re: query shell environment or hardstatus in other windows

Jostein Berntsen <jbernts-gyXR7Lt7FVk/[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <20110818163306.GA21514@josteinb>
On 18.08.11,10:36, Kevin Van Workum wrote:
> Hi,
> 
> I would like to query the values of environment variable that are set in the
> shells of other window in my screen session. For example, I would like to
> know the value of $HOSTNAME in window 0 while in window 1.
> 
> Really, all I want is HOSTNAME, USER, and PWD which are all displayed on my
> hardstatus line. So if I could just get the hardstatus line for each window,
> that would be fine. The idea would be to create a screen-aware scp command
> to copy files from one location to another.
> 

This should work:

:eval "at 0" "echo '$HOSTNAME $USER $PWD'"


Jostein
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.