[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Session name in status line
From: |
Alexander Steinert |
Subject: |
Re: Session name in status line |
Date: |
Wed, 11 Mar 2009 12:29:16 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Frank Blendinger, Wed 2009-03-11 01:53 CET:
> Hi,
>
> I want to see the name of the session in my caption. As there is no
> predefined string escape, I tried this:
>
> backtick 1 0 0 echo $STY
> caption always "...%1`..."
>
> but the environment variable STY is not set when the backtick command is
> executed.
>
> How could I get the session name otherwise?
Since $STY is not set yet when screen sources .screenrc, you can use
this trick in your .screenrc:
screen
screen $SHELL -c 'screen -X caption always "$STY"'
I.e. send a screen command to the first window.
HTH
Stony