Adam Rosien
Adam Rosien

Reputation: 545

Is there a way to format the output of sbt's show command?

For example, if I run 'show dependency-classpath' I get a really really long single line since the default output format is the toString() of an ArrayBuffer. Is there any pretty-print option so this output is easier to read?

Upvotes: 1

Views: 466

Answers (1)

Mark Harrah
Mark Harrah

Reputation: 7019

There is a new export command in 0.13 designed to show classpaths and compile/run commands in a form usable on the command line. For example,

> export dependencyClasspath
/home/user/.sbt/boot/scala-2.10.1/lib/scala-library.jar:/home/user/.ivy2/cache/com.sun.jmx/jmxri/jars/jmxri-1.2.1.jar

The task has to explicitly output this format, whereas show just calls toString on whatever the result is. There isn't another alternative to print one per line or anything like that.

Upvotes: 3

Related Questions