Color in Mac OS X's Terminal for RI

B

Benoit Daloze

[Note: parts of this message were removed to make it a legal post.]

Hi Rubyists,

I'm wondering why I can't have colors for `ri` in my Terminal.app

Well, I tried this command (ri -f ansi Hash) with 3 interpreters:
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] => doesn't
work, I get some ESC[1m
ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin9.8.0] => doesn't work, I
get some ESC[1m

jruby 1.4.0RC3 (ruby 1.8.7 patchlevel 174) (2009-10-28 d0f6289) (Java
HotSpot(TM) Client VM 1.5.0_20) [i386-java]
=> WORK (but not so cool colors.. that's another subject...)

The difference I see is jruby output directly to the STDOUT, while the ruby
interpreters use `less`, which seem to not work good with these colors...

In fact I'm resolving myself my own problem ....

Using -T(--no-pager) send directly to STDOUT, what works.

So my question is: why `less` doesn't accept colors?

P.S.: Anyway I've aliased ri to "ri --no-pager -f ansi", and I'm happy since
I don't like so much these pagers...

Enjoy Ruby !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top