tcols

command
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

tcols - add color to text on the terminal

Tcols reads text from a file and writes the colorized text to the standard output.

Usage:

tcols [-s|--style arg...] [file...]

Options:

-h, --help   show this help message and exit
-s, --style  list of styles and colors to apply to text

Example:

tcols --style 'bold bluefg' < <(echo -n 'Hello, world!')
echo -n Hello, world\! | tcols -s bold -s bluefg

Output:

Raw: \033[1m\033[34mHello, World!\033[0m

The program returns text read from a file with Select Graphic Rendition control sequences prepended and the reset control sequence appended at the end. The sequence of attributes passed to the --style flag of the command is preserved, so colors and styles can (un)intentionally cancel out one another.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL