Command

abstract class Command[T](implicit parser: Parser[T], help: Help[T]) extends CaseApp[T]
class CaseApp[T]
class Object
trait Matchable
class Any

Value members

Concrete methods

Inherited methods

def complete(args: Seq[String], index: Int): List[CompletionItem]
Inherited from:
CaseApp
Inherited from:
CaseApp
Inherited from:
CaseApp
def error(message: Error): Nothing
Inherited from:
CaseApp
def exit(code: Int): Nothing
Inherited from:
CaseApp

Arguments are expanded then parsed. By default, argument expansion is the identity function. Overriding this method allows plugging in an arbitrary argument expansion logic.

Arguments are expanded then parsed. By default, argument expansion is the identity function. Overriding this method allows plugging in an arbitrary argument expansion logic.

One such expansion logic involves replacing each argument of the form '@' with the contents of that file where each line in the file becomes a distinct argument. To enable this behavior, override this method as shown below.

Example:
import caseapp.core.parser.PlatformArgsExpander
override def expandArgs(args: List[String]): List[String]
= PlatformArgsExpander.expand(args)
Inherited from:
CaseApp
def fullHelpAsked(progName: String): Nothing
Inherited from:
CaseApp
Inherited from:
CaseApp
Inherited from:
CaseApp
def helpAsked(progName: String, maybeOptions: Either[Error, T]): Nothing
Inherited from:
CaseApp
Inherited from:
CaseApp

Whether to ignore unrecognized arguments.

Whether to ignore unrecognized arguments.

That is, if there are unrecognized arguments, the parsing still succeeds. The unparsed arguments are put in the args argument of run.

Inherited from:
CaseApp
def main(progName: String, args: Array[String]): Unit
Inherited from:
CaseApp
def main(args: Array[String]): Unit
Inherited from:
CaseApp
Inherited from:
CaseApp
def run(options: T, remainingArgs: RemainingArgs): Unit
Inherited from:
CaseApp

Whether to stop parsing at the first unrecognized argument.

Whether to stop parsing at the first unrecognized argument.

That is, stop parsing at the first non option (not starting with "-"), or the first unrecognized option. The unparsed arguments are put in the args argument of run.

Inherited from:
CaseApp
def usageAsked(progName: String, maybeOptions: Either[Error, T]): Nothing
Inherited from:
CaseApp

Inherited fields

lazy val finalHelp: Help[_]
Inherited from:
CaseApp

Implicits

Inherited implicits

implicit val messages: Help[T]
Inherited from:
CaseApp
implicit val parser0: Parser[T]
Inherited from:
CaseApp