Henrik
Henrik

Reputation: 9945

Colourise ruby syntax from 'cat' output

I want to be able to get colours for Ruby (or C# or F#) in the shells.

wirble does it nicely with IRB, but I want to be able to do:

> cat rakefile.rb | colorize

Does somebody know how I could do this? I know that github's language parsers are OSS - could they be used to read lines one by one and colourise them?

Upvotes: 2

Views: 154

Answers (2)

Mladen Jablanović
Mladen Jablanović

Reputation: 44090

You can try source-highlight as well.

Upvotes: 0

three
three

Reputation: 8478

pygments does that for you: http://pygments.org/docs/cmdline/

Upvotes: 2

Related Questions