groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] preserve ascii escape characters from input


From: Werner LEMBERG
Subject: Re: [Groff] preserve ascii escape characters from input
Date: Thu, 25 Feb 2010 16:29:45 +0100 (CET)

> The man page should probably also mention terminal-independent ways
> of doing some of these escape sequences, e.g. tput(1) and
> terminfo(5).  These two produce the same bytes on a terminal that
> supports ANSI,
> 
>     printf 'aaa\x1b[1mbbb\x1b[m\x1b(Bccc\n'
>     echo "aaa`tput bold`bbb`tput sgr0`ccc"
> 
> but the latter will also work on other terminals.  It's horrible
> when commands hard-code ANSI escape sequences, e.g. the otherwise
> good dstat(1).

Fortunately, it's not the job of groff to support that.  If necessary,
the pager programm has to access the terminfo database and translate
ANSI sequences to whatever the terminal understands.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]