Skip to content

clikt / com.github.ajalt.clikt.parsers / OptionParser


interface OptionParser

A parser for Options.

All functions should be pure, since the same command instance can parse arguments multiple times.


Name Summary
Invocation The input from a single instance of an option class Invocation
ParseResult data class ParseResult


Name Summary
parseLongOpt Parse a single long option and its value.abstract fun parseLongOpt(option:Option, name:String, argv:List<String>, index:Int, explicitValue:String?): ParseResult
parseShortOpt Parse a single short option and its value.abstract fun parseShortOpt(option:Option, name:String, argv:List<String>, index:Int, optionIndex:Int): ParseResult


Name Summary
FlagOptionParser A parser for options that take no values.object FlagOptionParser :OptionParser
OptionWithValuesParser An option that takes one more valuesobject OptionWithValuesParser :OptionParser