Sunday, September 13, 2009

Pipe less with colors


# Normal pipe will not output ANSI colors
ruby twitpow.rb history | less

# There is an entry in "less --help" that says
-r -R .... --raw-control-chars --RAW-CONTROL-CHARS
Output "raw" control characters.

# Pipe less with ANSI colors!
ruby twitpow.rb history | less -r

No comments:

Blog Archive