File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,12 @@ open class ArgParser(
143
143
/* *
144
144
* Used prefix form for full option form.
145
145
*/
146
- private val optionFullFormPrefix = if (prefixStyle == OptionPrefixStyle .JVM ) " -" else " --"
146
+ protected val optionFullFormPrefix = if (prefixStyle == OptionPrefixStyle .JVM ) " -" else " --"
147
147
148
148
/* *
149
149
* Used prefix form for short option form.
150
150
*/
151
- private val optionShortFromPrefix = " -"
151
+ protected val optionShortFromPrefix = " -"
152
152
153
153
/* *
154
154
* Name with all commands that should be executed.
@@ -436,7 +436,9 @@ open class ArgParser(
436
436
internal fun saveOptionWithoutParameter (argValue : ParsingValue <* , * >) {
437
437
// Boolean flags.
438
438
if (argValue.descriptor.fullName == " help" ) {
439
- usedSubcommand?.saveOptionWithoutParameter(argValue)
439
+ usedSubcommand?.let {
440
+ it.parse(listOf (" ${it.optionFullFormPrefix}${argValue.descriptor.fullName} " ))
441
+ }
440
442
println (makeUsage())
441
443
exitProcess(0 )
442
444
}
You can’t perform that action at this time.
0 commit comments