I'd like to use Clikt to parse database search arguments from a TextField
in a Compose Desktop app, but in the documentation all the examples seem to include the run
function like this:
class Filter : CliktCommand() {
val firstName: String? by option()
val timeframe: String? by option().choice("any", "today", "week")
override fun run() = Unit
}
Is there a way to just parse a string and get the resulting options so that I can use them for other purposes without running the command itself? I'm thinking about something like this (pseudocode):
val filter = CliktEtc.parse(argv).as(Filter::class)