Hi.

On Wed 2009-03-11 12:29, Alexander Steinert <sput...@termo.net>
proclaimed:
> Frank Blendinger, Wed 2009-03-11 01:53 CET:
> > 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.

This is great, thanks!


Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to