1

How do I add the GNU/Screen's session-name (as set by C-a :sessionname foo) to its' status line?

The manual says that S is the escape code for session name but when I try to add %S to my caption I get 0S instead of foo.

What am I doing wrong?

1
  • 2
    Adding %S to your hardstatus line should work like you expect. I guess you have made an error in your .screenrc. Maybe you want to post it here?
    – bjanssen
    Feb 23, 2014 at 12:11

1 Answer 1

2

Given @bjanssen's comment, I investigated further and found that:

  • On RHEL 4.8 with Screen version 4.00.02 (FAU) 5-Dec-03, it prints 0S.
  • On RHEL 6.4 with Screen version 4.00.03 (FAU) 23-Oct-06, it prints nothing.
  • On openSUSE 13.3 with Screen version 4.00.04devel (GNU) 8-Jun-12, it prints foo - the correct result.

And indeed according to the ChangeLog:

Version 4.1.0 (??/??/20??):
  ...
  .screenrc:
    ...
    * '%S' in caption/hardstatus string expands to the session name.

mystery solved.

1
  • Thanks. The gnu-screen shipped on my OSX 10.8.5 is also 4.00.03
    – xverges
    Mar 13, 2014 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .