UnitFlag
A helper trait that defaults parseArgument to a Unit value.
Attributes
- Source:
- Flag.scala
- Graph
- Supertypes
- Known subtypes
- trait BooleanFlagobject HelpFlag.type
Members list
Value members
Concrete methods
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
- Source:
- Flag.scala
Inherited methods
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
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
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
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
Inherited fields
A description of the purpose of this flag, used in documentation.
A description of the purpose of this flag, used in documentation.
Attributes
- Inherited from:
- Flag
- Source:
- Flag.scala
Indicates this Flag expects an argument. Defaults to true.
Indicates this Flag expects an argument. Defaults to true.
Attributes
- Inherited from:
- Flag
- Source:
- Flag.scala
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
- Inherited from:
- Flag
- Source:
- Flag.scala
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
- Inherited from:
- Flag
- Source:
- Flag.scala