ScalaCommandWithCustomHelp

scala.cli.commands.ScalaCommandWithCustomHelp
abstract class ScalaCommandWithCustomHelp[T <: HasGlobalOptions](actualHelp: => RuntimeCommandsHelp)(implicit myParser: Parser[T], help: Help[T]) extends ScalaCommand[T]

Attributes

Graph
Supertypes
class ScalaCommand[T]
class Command[T]
class CaseApp[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class Default
class HelpCmd

Members list

Type members

Inherited classlikes

implicit class EitherBuildExceptionOps[E <: BuildException, T](either: Either[E, T])

Attributes

Inherited from:
CommandHelpers
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

protected def customHelp(showHidden: Boolean): String
protected def customHelpAsked(showHidden: Boolean): Nothing
override def fullHelpAsked(progName: String): Nothing

Attributes

Definition Classes
CaseApp
override def helpAsked(progName: String, maybeOptions: Either[Error, T]): Nothing

Attributes

Definition Classes
CaseApp

Inherited methods

protected def SpecificationLevel: SpecificationLevel.type

Attributes

Inherited from:
RestrictableCommand
protected def actualCommandName: String

The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.

The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.

Attributes

Inherited from:
ScalaCommand
protected def actualFullCommand: String

Attributes

Inherited from:
ScalaCommand
protected def allowRestrictedFeatures: Boolean

Attributes

Inherited from:
ScalaCommand
protected def baseRunnerName: String

Attributes

Returns

the actual Scala CLI base runner name, for SIP it is scala otherwise scala-cli

Inherited from:
ScalaCommand
def buildOptions(options: T): Option[BuildOptions]

Value parameters

options

command-specific T options

Attributes

Returns

Tries to create BuildOptions based on sharedOptions and exits on error. Override to change this behaviour.

Inherited from:
ScalaCommand
protected def buildOptionsOrExit(options: T): BuildOptions

Attributes

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

Attributes

Inherited from:
CaseApp
override def completer: Completer[T]

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
protected def defaultScalaVersion: String

Attributes

Inherited from:
ScalaCommand
def ensureNoDuplicates(): Unit

Attributes

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

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
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
protected def fullRunnerName: String

Attributes

Returns

the actual Scala CLI runner name which was run

Inherited from:
ScalaCommand
def group: String

Attributes

Inherited from:
Command
override def hasFullHelp: Boolean

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def hasHelp: Boolean

Attributes

Inherited from:
CaseApp
override def helpFormat: HelpFormat

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
override def hidden: Boolean

Attributes

Definition Classes
ScalaCommand -> Command
Inherited from:
ScalaCommand
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
protected def invokeData: ScalaCliInvokeData

Attributes

Inherited from:
ScalaCommand
final def isExperimental: Boolean

Attributes

Inherited from:
RestrictableCommand
final def isRestricted: Boolean

Attributes

Inherited from:
RestrictableCommand

Attributes

Inherited from:
ScalaCommand
override def logger: Logger

Attributes

Definition Classes
Inherited from:
ScalaCommand
final override def main(progName: String, args: Array[String]): Unit

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def main(args: Array[String]): Unit

Attributes

Inherited from:
CaseApp
def maybePrintGroupHelp(options: T): Unit

Attributes

Inherited from:
ScalaCommand
def maybePrintSimpleScalacOutput(options: T, buildOptions: BuildOptions): Unit

Print scalac output if passed options imply no inputs are necessary and raw scalac output is required instead. (i.e. --scalac-option -help)

Print scalac output if passed options imply no inputs are necessary and raw scalac output is required instead. (i.e. --scalac-option -help)

Value parameters

options

command options

Attributes

Inherited from:
ScalaCommand
def maybePrintToolsHelp(options: T, buildOptions: BuildOptions): Unit

Attributes

Inherited from:
ScalaCommand
def name: String

Attributes

Inherited from:
Command
def names: List[List[String]]

Attributes

Inherited from:
Command
override def parser: Parser[T]

Attributes

Definition Classes
Inherited from:
RestrictableCommand
final def printLine(line: String): Unit

Attributes

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

Attributes

Inherited from:
CaseApp
protected def progName: String

Attributes

Returns

the actual Scala CLI program name which was run

Inherited from:
ScalaCommand
final override def run(options: T, remainingArgs: RemainingArgs): Unit

This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.

This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.

Attributes

Definition Classes
ScalaCommand -> CaseApp
Inherited from:
ScalaCommand
def runCommand(options: T, remainingArgs: RemainingArgs, logger: Logger): Unit

This should be overridden instead of run when extending ScalaCommand.

This should be overridden instead of run when extending ScalaCommand.

Value parameters

options

the command's specific set of options

remainingArgs

arguments remaining after parsing options

Attributes

Inherited from:
ScalaCommand
def scalaSpecificationLevel: SpecificationLevel

Is that command a MUST / SHOULD / NICE TO have for the Scala runner specification?

Is that command a MUST / SHOULD / NICE TO have for the Scala runner specification?

Attributes

Inherited from:
RestrictableCommand
override def setArgv(argv: Array[String]): Unit

Attributes

Definition Classes
Inherited from:
ScalaCommand
def sharedOptions(t: T): Option[SharedOptions]

Attributes

Inherited from:
ScalaCommand

Attributes

Definition Classes
Inherited from:
ScalaCommand

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

protected var argvOpt: Option[Array[String]]

Attributes

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

Attributes

Inherited from:
CaseApp
override val messages: Help[T]

Attributes

Inherited from:
ScalaCommand
lazy override val nameFormatter: Formatter[Name]

Attributes

Inherited from:
ScalaCommand

Givens

Inherited givens

given given_ScalaCliInvokeData: ScalaCliInvokeData

Attributes

Inherited from:
ScalaCommand

Implicits

Inherited implicits

final implicit def EitherBuildExceptionOps[E <: BuildException, T](either: Either[E, T]): EitherBuildExceptionOps[E, T]

Attributes

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

Attributes

Inherited from:
CaseApp