case class Scallop(args: Seq[String] = Nil, opts: List[CliOption] = Nil, mainOptions: List[CliOption] = Nil, optionGroups: List[(String, Seq[CliOption])] = Nil, vers: Option[String] = None, bann: Option[String] = None, foot: Option[String] = None, descr: String = "", helpWidth: Option[Int] = None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter, subbuilders: List[(String, Scallop)] = Nil) extends ScallopArgListLoader with Product with Serializable

Internal configuration builder.

Source
Scallop.scala
Linear Supertypes
Serializable, Product, Equals, ScallopArgListLoader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scallop
  2. Serializable
  3. Product
  4. Equals
  5. ScallopArgListLoader
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Scallop(args: Seq[String] = Nil, opts: List[CliOption] = Nil, mainOptions: List[CliOption] = Nil, optionGroups: List[(String, Seq[CliOption])] = Nil, vers: Option[String] = None, bann: Option[String] = None, foot: Option[String] = None, descr: String = "", helpWidth: Option[Int] = None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter, subbuilders: List[(String, Scallop)] = Nil)

Type Members

  1. case class CliOptionInvocation(opt: CliOption, invocation: String, args: List[String], error: Option[ScallopException] = None) extends Product with Serializable
  2. case class ParseResult(opts: Parsed = Nil, subcommand: Option[String] = None, subcommandArgs: List[String] = Nil) extends Product with Serializable
  3. type Parsed = List[CliOptionInvocation]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addSubBuilder(nameAndAliases: Seq[String], builder: Scallop): Scallop

    Adds a subbuilder (subcommand) to this builder.

  5. val appendDefaultToDescription: Boolean
  6. def appendOption(option: CliOption): Scallop
  7. def apply(name: Char): Any
  8. def apply(name: String): Any

    Get the value of option.

    Get the value of option. If option is not found, this will throw an exception.

    name

    Name for option.

  9. def args(a: Seq[String]): Scallop

    Add some more arguments to this builder.

    Add some more arguments to this builder. They are appended to the end of the original list.

    a

    arg list to add

  10. val args: Seq[String]
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. val bann: Option[String]
  13. def banner(b: String): Scallop

    Add banner string to this builder.

    Add banner string to this builder. Banner should describe your program and provide a short summary on it's usage.

    b

    Banner string, can contain multiple lines. Note this is not formatted to 80 characters!

  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. val descr: String
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def filteredSummary(blurred: Set[String]): String

    Get summary of current parser state, hididng values for some of the options.

    Get summary of current parser state, hididng values for some of the options. Useful if you log the summary and want to avoid storing sensitive information in the logs (like passwords)

    blurred

    names of the options that should be hidden.

    returns

    a list of all options in the builder

  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  19. def findSubbuilder(name: String): Option[Scallop]

    Traverses the tree of subbuilders, using the provided name.

    Traverses the tree of subbuilders, using the provided name.

    name

    Names of subcommand names, that lead to the needed builder, separated by \\0.

  20. val foot: Option[String]
  21. def footer(f: String): Scallop

    Add footer string to this builder.

    Add footer string to this builder. Footer will be printed in help after option definitions.

    f

    Footer string, can contain multiple lines. Note this is not formatted to 80 characters!

  22. def get(name: Char): Option[Any]
  23. def get(name: String): Option[Any]

    Get the value of option (or trailing arg) as Option.

    Get the value of option (or trailing arg) as Option.

    name

    Name for option.

  24. def getAllSuppliedOptionNames: List[String]

    Retrieves a list of all supplied options (including options from subbuilders).

  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def getFullHelpString(): String

    Get full help text (with version, banner, option usage and footer)

  27. lazy val getHelpOption: CliOption
  28. def getOptionShortNames(opt: CliOption): List[Char]
  29. def getOptionWithShortName(c: Char): Option[CliOption]

    Find an option, that responds to this short name.

  30. def getSubbuilder: Option[Scallop]

    Retrieves the subbuilder object, that matches the name of the subcommand found in input arguments.

  31. def getSubcommandArgs: List[String]

    Returns the subcommand arguments.

  32. def getSubcommandName: Option[String]

    Retrieves name of the subcommand that was found in input arguments.

  33. def getSubcommandNames: List[String]

    Returns the list of subcommand names, recursively.

  34. lazy val getVersionOption: Option[CliOption]
  35. def help: String

    Get help on options from this builder.

    Get help on options from this builder. The resulting help is carefully formatted to required number of columns (default = 80, change with .setHelpWidth method), and contains info on properties, options and trailing arguments.

  36. val helpFormatter: ScallopHelpFormatter
  37. val helpWidth: Option[Int]
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def isSupplied(name: String): Boolean

    Tests if this option or trailing arg was explicitly provided by argument list (not from default).

    Tests if this option or trailing arg was explicitly provided by argument list (not from default).

    name

    Identifier of option or trailing arg definition

  40. def loadArgList(args: Seq[String]): Seq[String]
    Definition Classes
    ScallopArgListLoader
  41. val mainOptions: List[CliOption]
  42. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. val noshort: Boolean
  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. val optionGroups: List[(String, Seq[CliOption])]
  47. val opts: List[CliOption]
  48. var parent: Option[Scallop]
  49. def printHelp(): Unit

    Print help message (with version, banner, option usage and footer) to stdout.

  50. def productElementNames: Iterator[String]
    Definition Classes
    Product
  51. def prop(name: Char, key: String): Option[Any]
  52. def setHelpWidth(w: Int): Scallop

    Explicitly sets the needed width for the help printout.

  53. val shortSubcommandsHelp: Boolean
  54. val subbuilders: List[(String, Scallop)]
  55. def summary: String

    Get summary of current parser state.

    Get summary of current parser state.

    Returns a list of all options in the builder, and corresponding values for them.

  56. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  57. def verify: Scallop

    Verify the builder.

    Verify the builder. Parses arguments, makes sure no definitions clash, no garbage or unknown options are present, and all present arguments are in proper format. It is recommended to call this method before using the results.

    If there is "--help" or "--version" option present, it prints help or version statement and exits.

  58. val vers: Option[String]
  59. def version(v: String): Scallop

    Add version string to this builder.

    Add version string to this builder.

    v

    Version string, to be printed before all other things in help.

  60. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  61. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ScallopArgListLoader

Inherited from AnyRef

Inherited from Any

Ungrouped