Reputation: 9189
In sbt commands
displays a list with a default non-descriptive toString
> commands
[info] List(sbt.SimpleCommand@46fb833a, sbt.SimpleCommand@2a64793e, sbt.SimpleCommand@2a53eb30, sbt.SimpleCommand@6b75b205)
How I could iterate over the list and display a name of the commands?
Upvotes: 1
Views: 49
Reputation: 6102
This is a known issue, which will be fixed in 0.13.9.
As a stop gap you can do something like this in consoleProject
:
commands.eval map { c =>
ReflectUtilities fields c.getClass get "name" map { f =>
f setAccessible true
f get c toString
} getOrElse c.toString
}
Upvotes: 1