screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query shell environment or hardstatus in other windows


From: Jostein Berntsen
Subject: Re: query shell environment or hardstatus in other windows
Date: Thu, 18 Aug 2011 20:54:36 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On 18.08.11,12:51, Kevin Van Workum wrote:
> On Thu, Aug 18, 2011 at 12:33 PM, Jostein Berntsen <address@hidden>wrote:
> 
> > 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'"
> >
> 
> No, that just evaluates the variables in screen's environment. I want the
> variables in the operating shell of a given window, or just the status line
> of a window.
> 
>

Would this work better? 

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


Jostein





reply via email to

[Prev in Thread] Current Thread [Next in Thread]