[Alpine-info] Recent changes with alpine/screen causing status
bars to be italic
via Alpine-info
alpine-info at u.washington.edu
Mon Sep 8 22:13:24 PDT 2025
> I noticed recently that when running alpine under TERM=screen, that all
> the normal prompts which would display in inverse video, like the
> statusbar highlight, instead display in italic. (This seems to happen
> even if you’re not running under gnu screen).
>
> Have there been any recent code changes that would cause this?
This is almost certainly due to a change in your base OS's
termcap/terminfo config.
I've noticed the same thing on recent FreeBSD versions.
TL;DR: try running alpine as "TERM=tmux alpine" and see if that fixes it.
(Note, you do not have to actually run tmux; you can use TERM=tmux inside
of GNU screen, or in just a raw terminal without screen or tmux.)
Longer story: the terminal capability in play here is "standout". Under
termcap, "so" enters standout mode, and "se" exits standout mode. (Under
terminfo, it's "smso" and "rmso" respectively. But I will stick to
termcap below as I'm olde-fashioned; adjusting for terminfo systems is
left as an exercise.)
Looking at my system's /etc/termcap, I see:
SC|screen|VT 100/ANSI X3.64 virtual terminal:\
:[...lines elided...]
:nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[23m:sf=\n:\
:so=\E[3m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\
:[...more lines elided...]
And just a bit farther down:
tmux|tmux terminal multiplexer:\
:so=\E[7m:se=\E[27m:\
:tc=ecma+italics:tc=screen:
The "so" entry for terminal type "screen" sends the ANSI escape sequence
to enable italics: <ESC>[3m
And following that, we see that the terminal type "tmux" inherits from
"screen" but then overrides the so/se properties, sending the ANSI escape
sequence for reverse-video instead: <ESC>[7m
We want to use that latter escape sequence for so (and the analagous 27m
to cancel it).
Several methods are available to configure things the way we want:
* Just set TERM=tmux for everything, in perpetuity, and not worry about
it.
* Modify the system /etc/termcap (if possible), and change so/se for
"screen".
* Modify screenrc (either your personal, or the system-wide one) and
override the termcap properties for so/se.
* Set a custom "TERMCAP" environment variable for "screen" which basically
copies the system one but overrides so/se. Add this to either your
personal shell prefs or to the system-wide shell prefs.
When creating or modifying system-wide files, consider future OS upgrades:
your changes may get overwritten, or else may prevent installing upgraded
versions of your OS's standard config files.
Good luck.
-Jason
More information about the Alpine-info
mailing list