Hello,
After upgrading from screen 4.9.1 to 5.0.2, my .screenrc line
attrcolor b ".I"
stopped working. On startup screen briefly shows
rc: unknown command 'attrcolor'
The man page and texinfo manual shipped with 5.0.2 still describe
"attrcolor" in full, examples included ('attrcolor b ".I"' -- "Use
bright colors for bold text"), so at first I took this for a bug.
Looking at the git history, the command was removed on purpose:
commit d95ad5452fff7e3f4500ce9759756d69f0064986
Author: Amadeusz Sławiński <[email protected]>
AuthorDate: Sat Jan 5 22:40:03 2013 +0100
CommitDate: Thu Jun 25 16:35:02 2015 +0200
remove attrcolor, some more color handling stuff
That commit removes the "attrcolor" entry from comm.c, the
RC_ATTRCOLOR handler in process.c and the attr2color[] mapping in
SetRendition()/SetRenditionMline() in display.c. It is in the history
of v.5.0.0, v.5.0.1 and v.5.0.2, but not of the 4.x releases, which
came from a separate branch. As far as I can tell, neither NEWS nor
ChangeLog mention the removal, and the commit message doesn't explain
it.
So for users coming from 4.x:
1. a documented command fails, and the only sign is a message
shown for a moment at startup;
2. the documentation (doc/screen.1, doc/screen.texinfo, and
etc/completer.zsh) still describes the command;
3. there is no documented replacement for the bold -> bright
mapping.
Could you please either bring back "attrcolor" (or at least the
'b ".I"' bold-to-bright mapping), or document the removal in NEWS /
ChangeLog, remove it from the manual and mention a migration path?
Why it matters
--------------
With an outer TERM=xterm-256color (on FreeBSD), the terminfo "setaf" is
\E[38;5;%p1%dm, so screen sends colors 0-7 as "38;5;N". An
application's ESC[1;30m (bold black, "dark gray") goes out as
ESC[1m ESC[38;5;0m
Some terminals (Konsole 26.08.2 here) only switch bold text to the
bright palette entry when the color comes as SGR 30-37, so this text
is drawn in plain color 0 and can't be seen on a black background.
Likewise bold green (ESC[1;32m) looks the same as normal green. With
4.9.1, 'attrcolor b ".I"' turned these into bright colors 8-15 and
the text looked right.
Version
-------
Screen version 5.0.2 (build on 2026-08-16 01:04:24)
Previously used: 4.9.1 (FreeBSD port screen-4.9.1_5)
Hardware / OS / compiler
------------------------
amd64
FreeBSD 15.2-PRERELEASE
FreeBSD clang version 21.1.8
Binary package from FreeBSD-ports (screen-5.0.2_1), default options
Workaround
----------
Forcing the classic SGR 30-37 form for colors 0-7 makes the terminal
do the bold -> bright mapping itself; 256-color output (e.g.
38;5;196) is unaffected:
termcapinfo xterm* 'AF=\E[3%dm'
--
Andriy Gapon