Saturday, December 12, 2009

Groovy Shell gets some Color

Well, well, it looks like Groovy Shell (groovysh) is starting to catch up to the other IDEs. Yesterday, support for colored output was added!

The Jansi library has added to the Groovy 1.8 snapshot, and now you get color coded output on all platforms, including Windows. Here is an Ubuntu screenshot:

And here's how to make it work in 3 easy steps:

1) Download Jansi and put it in your classpath
2) Get the nightly Groovy install*
3) Invoke groovysh with the -C parameter!

* As an alternative, it is incredibly simple to build Groovy from source:

svn co https://svn.codehaus.org/groovy/trunk/groovy/groovy-core
ant install -DskipTests=true
Happy Evaluating!

2 comments:

Jason said...

Groovysh has actually had color for quite a while now, since the rewrite, but only on unix systems. The new thing is windows support.

paulk said...

And you'll need a jna.jar file in your classpath for windows too as per the jansi web site.