Ruby ri output not coloured in iTerm 2

1

When I run Ruby ri in an iTerm 2 terminal window, the output is not coloured and I don't know why. Other programs such as Vim work with colour properly.

Running ri -f ansi Array.sort results in output that looks like this:

ESC[0mESC[1;32mArray.sortESC[m

(from ruby core)
------------------------------------------------------------------------------
  ary.sort                   -> new_ary
  ary.sort { |a, b| block }  -> new_ary

------------------------------------------------------------------------------

Returns a new array created by sorting ESC[7mselfESC[m.

As you can see the ANSI excape characters are all visible.

How can I fix this?

jordelver

Posted 2014-07-13T20:40:26.437

Reputation: 1 781

No answers