mirror of https://github.com/sbt/sbt.git
sort and indent about plugins output
This commit is contained in:
parent
17f5bc149e
commit
5fd774693c
|
|
@ -238,9 +238,22 @@ object BuiltinCommands {
|
|||
} else "No project is currently loaded"
|
||||
|
||||
def aboutPlugins(e: Extracted): String = {
|
||||
def list(b: BuildUnit) = b.plugins.detected.autoPlugins.map(_.value.label)
|
||||
val allPluginNames = e.structure.units.values.flatMap(u => list(u.unit)).toSeq.distinct
|
||||
if (allPluginNames.isEmpty) "" else allPluginNames.mkString("Available Plugins: ", ", ", "")
|
||||
def plugins(lbu: LoadedBuildUnit) =
|
||||
lbu.unit.plugins.detected.autoPlugins
|
||||
.map(_.value.label)
|
||||
|
||||
val allPluginNames =
|
||||
e.structure.units.values
|
||||
.flatMap(plugins)
|
||||
.toList
|
||||
.distinct
|
||||
.sorted
|
||||
|
||||
if (allPluginNames.isEmpty)
|
||||
""
|
||||
else
|
||||
("Available Plugins" +: allPluginNames)
|
||||
.mkString("\n - ")
|
||||
}
|
||||
|
||||
def aboutScala(s: State, e: Extracted): String = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue