[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to interpret ansi escape code like "\033[; 1; 31mHello World\033
From: |
Bernd Jendrissek |
Subject: |
Re: How to interpret ansi escape code like "\033[; 1; 31mHello World\033[0m"? |
Date: |
Wed, 19 Nov 2008 20:09:34 +0200 |
On Wed, Nov 19, 2008 at 6:31 PM, Bryan Christ <address@hidden> wrote:
> It would be next to impossible for you to interpret ever possible
> terminal definition (/usr/share/terminfo/*/*). Instead, you need to
> create your own terminfo definition or find one you think suits your
> needs. Then, call setenv() to set the TERM var before you call exec().
> Once you have done this, your parser can deal strictly with predictable
> escape sequences.
Is it always possible to install new terminfo entries, even if you aren't root?
One doesn't need to interpret ALL possible sequences - merely
interpret ONE (or a FEW) that you know are nearly universal (VT100 and
xterm would be good choices), and advertise that to the host.