arkenv icon indicating copy to clipboard operation
arkenv copied to clipboard

--help doesn't include sub modules

Open jeggy opened this issue 4 years ago • 0 comments

class OtherArks: Arkenv() {
    val customConfig: String? by argument("--custom")
}
class Arks: Arkenv("My App") {
    val other = module(OtherArks())
    val port: Int by argument("--port") {
        defaultValue = { 8080 }
    }
}

fun main(args: Array<String>) {
    val arks = Arks().parse(args)

    if (arks.help) {
        println(arks.toString())
    }
}

outputs:

My App: 
    [-h, --HELP]        
        help        true
    [--ARKENV_APPLICATION_NAME]        
        programName        My App
    [--PORT]        
        port        8080

jeggy avatar Mar 09 '21 18:03 jeggy