leaf method

Returns the leaf command's context.

Implementation

CommandContext<OptionDefinition, T> leaf() {
  final nextContext = next;
  return nextContext == null ? this : nextContext.leaf();
}