Tuesday, August 16, 2016

Colorized Man Pages: Understood and Customized

Peter Hosey:

So when we want something underlined (for example), the us and ue entries in our terminal’s termcap record are what we need to send to the terminal to start and end underlining that section of text.

And less, it seems, provides this handy way to override those entries using environment variables. We can make us and ue and any other termcap string do whatever we want!

[…]

The \e[ essentially tells the terminal to start listening for a command that will change its behavior. m is actually the command here; all the inputs to the command come before it. The m command tells the terminal to change how it renders subsequent text until further notice.

Comments RSS · Twitter

Leave a Comment