Files
Scaffold/app/src/commands/ListCommand.kt
T

18 lines
481 B
Kotlin

package scaffold.commands
import com.github.ajalt.clikt.core.CliktCommand
import scaffold.Generators
class ListCommand(private val generators: Generators) : CliktCommand("list") {
override fun run() {
val generators = generators.findAll()
if (generators.isEmpty()) {
echo("No generators yet, you can create one with `scaffold new`")
} else {
generators.forEach {
echo(it.last())
}
}
}
}