Color output with ANSI codes #14

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@agimenez

Colorize special tokens (#hashtags, @mentions, urls) with ANSI codes.
Introduce new configuration variable (colorize).
Check if output is a TTY to avoid redirecting/piping garbage.

Signed-off-by: L. Alberto Giménez agimenez@sysvalve.es


I gave a shot to ncurses but its ending method clears out the screen and I didn't find a way to disable that behaviour (if it is possible at all). Also, implementation with ANSI color codes is simpler and not less standard.

@agimenez agimenez Color output with ANSI codes
Colorize special tokens (#hashtags, @mentions, urls) with ANSI codes.
Introduce new configuration variable (colorize).
Check if output is a TTY to avoid redirecting/piping garbage.

Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
9933d4e
@agimenez

Hi Greg,

Care to take a look at this pull request, please?

@gregkh
Owner
gregkh commented Jun 27, 2013

Instead of hard-coding ANSI colorstrings, how about using ncurses, or other libraries to access these properly, so it's portable to other terminal types?

@gregkh gregkh closed this Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment