mirror of https://github.com/sbt/sbt.git
Improve SelectMainClass output
This ensures that super shell lines are cleared.
This commit is contained in:
parent
cc80b6c6ed
commit
017e3e7f2c
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package sbt
|
package sbt
|
||||||
|
|
||||||
import sbt.internal.util.ConsoleAppender
|
import sbt.internal.util.ConsoleAppender.ClearScreenAfterCursor
|
||||||
import sbt.internal.util.Util.{ AnyOps, none }
|
import sbt.internal.util.Util.{ AnyOps, none }
|
||||||
|
|
||||||
object SelectMainClass {
|
object SelectMainClass {
|
||||||
|
|
@ -25,9 +25,9 @@ object SelectMainClass {
|
||||||
val classes = multiple.zipWithIndex
|
val classes = multiple.zipWithIndex
|
||||||
.map { case (className, index) => s" [${index + 1}] $className" }
|
.map { case (className, index) => s" [${index + 1}] $className" }
|
||||||
.mkString("\n")
|
.mkString("\n")
|
||||||
println(ConsoleAppender.ClearScreenAfterCursor + header + classes)
|
println(ClearScreenAfterCursor + header + classes + "\n")
|
||||||
|
|
||||||
val line = trim(prompt("\nEnter number: "))
|
val line = trim(prompt("Enter number: "))
|
||||||
toInt(line, multiple.length) map multiple.apply
|
toInt(line, multiple.length) map multiple.apply
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue