io.mth

pirate

package pirate

Pirate argument parser.

This package object exports everything required for normal usage.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. pirate
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Command[A] extends AnyRef

    Command data type.

    Command data type. Represents a command name; a possible description; a set of flags; and positional parameters.

    The data type includes combinators for building up more complex commands from a simple command name.

  2. sealed trait Commands[A] extends AnyRef

    Commands data type.

    Commands data type. Represents a command with sub-commands.

  3. sealed trait Flag[A] extends AnyRef

    Flag data type.

    Flag data type. Can represent one of:

    • flag with short and long identifier, and no argument
    • flag with only short identifier, and no argument
    • flag with only long identifier, and no argument
    • flag with short and long identifier, and an argument
    • flag with only short identifier, and an argument
    • flag with only long identifier, and an argument

    Each of the variants of this type include a function for transforming a type if it is succeeds in parsing.

  4. sealed trait Flags[A] extends AnyRef

    Flags data type.

    Flags data type. Represents a set of flags.

  5. sealed trait Parser[A] extends AnyRef

    Minimal parser combinator library, pimped with scalaz MA[M[_], A].

  6. sealed trait Positional[A] extends AnyRef

    Positional data type.

    Positional data type. Represents positional parameters, and their arity.

    Each of the variants of this type include a function for transforming a type if it is succeeds in parsing.

  7. sealed trait Positionals[A] extends AnyRef

    Positionals data type.

    Positionals data type. Represents a set of positional parameters..

  8. case class SubCommand[A](name: String, description: Option[String], toParser: Parser[A], usage: (UsageMode) ⇒ String) extends Product with Serializable

  9. case class UsageMode(condenseSynopsis: Boolean, flagIndent: Int, descIndent: Int, width: Int, tightOneOrManySynopsis: Boolean) extends Product with Serializable

    Usage mode provides configuration options for generating a usage string.

Value Members

  1. object Command

  2. object CommandParsers

    Parsers for command line arguments.

  3. object Commands

  4. object DefaultUsageMode extends UsageMode

    Default usage mode.

    Default usage mode.

    • Explicit synopsis.
    • 8/16 indents
    • 80 width
  5. object Flag

  6. object Flags

  7. object Parser

  8. object Positional

  9. object Positionals

  10. object Text

  11. object Usage

  12. def command[A]: (String) ⇒ Command[A]

  13. def commands[A]: (String) ⇒ Commands[A]

  14. def flag[A]: (Char, String, String) ⇒ ((A) ⇒ A) ⇒ Flag[A]

  15. def flag1[A]: (Char, String, String, String) ⇒ ((A, String) ⇒ A) ⇒ Flag[A]

  16. def long[A]: (String, String) ⇒ ((A) ⇒ A) ⇒ Flag[A]

  17. def long1[A]: (String, String, String) ⇒ ((A, String) ⇒ A) ⇒ Flag[A]

  18. def positional[A]: (String) ⇒ ((A, String) ⇒ A) ⇒ Positional[A]

  19. def positional0plus[A]: (String) ⇒ ((A, List[String]) ⇒ A) ⇒ Positional[A]

  20. def positional1plus[A]: (String) ⇒ ((A, List[String]) ⇒ A) ⇒ Positional[A]

  21. def positionalN[A]: (Int, String) ⇒ ((A, List[String]) ⇒ A) ⇒ Positional[A]

  22. def short[A]: (Char, String) ⇒ ((A) ⇒ A) ⇒ Flag[A]

  23. def short1[A]: (Char, String, String) ⇒ ((A, String) ⇒ A) ⇒ Flag[A]

Inherited from AnyRef

Inherited from Any

Ungrouped