Command

caseapp.core.app.Command
abstract class Command[T](implicit parser: Parser[T], help: Help[T]) extends CaseApp[T]

Attributes

Graph
Supertypes
class CaseApp[T]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def group: String
def hidden: Boolean
def name: String
def names: List[List[String]]

Inherited methods

def complete(args: Seq[String], index: Int): List[CompletionItem]

Attributes

Inherited from:
CaseApp

Attributes

Inherited from:
CaseApp
def ensureNoDuplicates(): Unit

Attributes

Inherited from:
CaseApp
def error(message: Error): Nothing

Attributes

Inherited from:
CaseApp
def exit(code: Int): Nothing

Attributes

Inherited from:
CaseApp
def expandArgs(args: List[String]): List[String]

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.

Attributes

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

Attributes

Inherited from:
CaseApp
def hasFullHelp: Boolean

Attributes

Inherited from:
CaseApp
def hasHelp: Boolean

Attributes

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

Attributes

Inherited from:
CaseApp

Attributes

Inherited from:
CaseApp
def ignoreUnrecognized: Boolean

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.

Attributes

Inherited from:
CaseApp
def main(progName: String, args: Array[String]): Unit

Attributes

Inherited from:
CaseApp
def main(args: Array[String]): Unit

Attributes

Inherited from:
CaseApp

Attributes

Inherited from:
CaseApp
final def printLine(line: String): Unit

Attributes

Inherited from:
CaseApp
def printLine(line: String, toStderr: Boolean): Unit

Attributes

Inherited from:
CaseApp
def run(options: T, remainingArgs: RemainingArgs): Unit

Attributes

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.

Attributes

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

Attributes

Inherited from:
CaseApp

Inherited fields

lazy val finalHelp: Help[_]

Attributes

Inherited from:
CaseApp

Implicits

Inherited implicits

implicit val messages: Help[T]

Attributes

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

Attributes

Inherited from:
CaseApp