HelpFlag

works.scala.cmd.HelpFlag$
case object HelpFlag extends BooleanFlag

A default Help flag, automatically provided to apps.

Attributes

Source:
Flag.scala
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait UnitFlag
trait Flag[Unit]
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
Source:
Mirror.scala
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
Source:
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source:
Mirror.scala
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
Source:
Mirror.scala
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton
Source:
Mirror.scala

Value members

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
Source:
Mirror.scala
final def isPresent(args: Array[String]): Boolean

Checks if flags to trigger this Flag are present in the provided Command arguments

Checks if flags to trigger this Flag are present in the provided Command arguments

Attributes

args

The arguments passed to the command

Returns:

true if present, otherwise false

Inherited from:
Flag
Source:
Flag.scala
override def parseArgument: PartialFunction[String, Unit]

A partial function that will take the String value of the passed argument, and convert it to type F.

A partial function that will take the String value of the passed argument, and convert it to type F.

Typical usage might be for parsing String to Int/Float/Custom Domain, e.g. for a Flag[Int], parse = str => str.toInt.

Advanced usage could be used to do more targeted work as well, such as processing the argument directly, versus simply obtaining the value for it to be parsed later, e.g. for a Flag[String], parse = str => str.toUpperCase

Attributes

Returns:

the evaluation of String => F

Definition Classes
Inherited from:
UnitFlag
Source:
Flag.scala
final def parseFirstFlagArg(args: Array[String]): Option[F]

A method that will find the first instance of an argument triggering this Flag, if present, and evaluate the parseArgument partial function on it.

A method that will find the first instance of an argument triggering this Flag, if present, and evaluate the parseArgument partial function on it.

Most useful when this Flag is expected once.

Attributes

args

The arguments passed to the command

See also:
Inherited from:
Flag
Source:
Flag.scala
final def parseFlagArgs(args: Array[String]): Seq[F]

Finds instances of arguments that trigger this Flag, and processes them through parseArgument

Finds instances of arguments that trigger this Flag, and processes them through parseArgument

Attributes

args

The arguments passed to the command

Inherited from:
Flag
Source:
Flag.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def stripArgs(args: Array[String]): Array[String]

A method to remove the flag trigger, and any arguments, from the input args, so that positional Args can then be processed

A method to remove the flag trigger, and any arguments, from the input args, so that positional Args can then be processed

Attributes

Inherited from:
Flag
Source:
Flag.scala

Concrete fields

override val description: String

A description of the purpose of this flag, used in documentation.

A description of the purpose of this flag, used in documentation.

Attributes

Source:
Flag.scala
override val name: String

The name of the flag, e.g. "help". This will be parsed as s"--$name", e.g. "--help"

The name of the flag, e.g. "help". This will be parsed as s"--$name", e.g. "--help"

Attributes

Source:
Flag.scala
override val shortKey: String

A short-key version of name, e.g. "h". This will be parsed as s"-$shortKey", e.g. "-h"

A short-key version of name, e.g. "h". This will be parsed as s"-$shortKey", e.g. "-h"

Attributes

Source:
Flag.scala

Inherited fields

override val hasArgument: Boolean

Indicates this Flag expects an argument. Defaults to true.

Indicates this Flag expects an argument. Defaults to true.

Attributes

Inherited from:
BooleanFlag
Source:
Flag.scala