On Tue, Aug 29, 2023 at 7:25 PM Dan Mahoney (Gushi) <d...@prime.gushi.org>
wrote:

> Hey there all,
>
> This might be slightly off-topic.  I am using a tool called wp-cli, where
> it tries to set "bold" values in its help text thusly:
>
> ESC[1mNAMEESC[0m
>
>    wp
>
> ESC[1mDESCRIPTIONESC[0m
>
>    Manage WordPress through the command-line.
>
> ESC[1mSYNOPSISESC[0m
>
>    wp <command>
>
> ESC[1mSUBCOMMANDSESC[0m
>
> So obviously, when I see those escape codes, my first thought was "I'm
> running screen, it's not recognizing them".  But that's not it.
>
> The problem happens even outside of screen, where terminal color still
> works perfectly well.  It breaks with both iterm and the mac terminal app.
> It breaks over both mosh and ssh.
>
> Ergo, either this is some kind of a terminal issue (I've tried xterm and
> xterm-256color), or a bug with the script where what it thinks is an
> escape code actually isn't sending the right escapes.
>
> Before I report this as a bug to them, I'd like to see if I can find some
> kind of "rosetta stone" that outputs various things that a terminal should
> support.  Ascii, Colors, 256-colors, ANSI escape codes, line draw
> characters, emojii, etc.
>
> I've found https://gist.github.com/sdeaton2/8450564 but I'm looking for
> something more complete.
>
> Does anyone know of such a thing?
>
> -Dan
>
> --
>
> -Harry nods-
>
> Vincent Spano, as Boris in "Creator".
>
>
> --------Dan Mahoney--------
> Techie,  Sysadmin,  WebGeek
> Gushi on efnet/undernet IRC
> FB:  fb.com/DanielMahoneyIV
> LI:   linkedin.com/in/gushi
> Site:  http://www.gushi.org
> ---------------------------
>
>
>
A) Use tput or an ANSI library to obtain the code sequences based on the
TERM setting instead of hard coding them.

B) See vttest https://invisible-island.net/vttest/vttest.html for xterm
tests

-- 
Visit serverfault.com to get your system administration questions answered.

Reply via email to