Trait

io.jobial.sclap.core

CommandLineParserDsl

Related Doc: package core

Permalink

trait CommandLineParserDsl extends AnyRef

Self Type
CommandLineParserDsl with Logging
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommandLineParserDsl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def executeCommandLine[A](commandLine: CommandLine[A], args: Seq[String]): IO[A]

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def args: Args

    Permalink

    Return the full list of arguments as it was passed on the command line.

    Return the full list of arguments as it was passed on the command line. It is rarely needed and param (with a range) is usually preferred.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @throws( ... )
  7. def command(name: String): Command

    Permalink

    Starting point for a command line interface specification.

    Starting point for a command line interface specification. The Command instance describes details that apply to the whole command like header and description, for example. A Command instance itself does not fully specify the CLI, a CommandLine has to be added to it to be able to function as a full command line spec. The CommandLine can be added by simply applying the command to a CommandLine instance. Example:

    command.header("My command") { for { level <- opt("level", "prod") .... } yield ... } }

  8. def command: Command

    Permalink

    Starting point for a command line interface specification.

    Starting point for a command line interface specification. The Command instance describes details that apply to the whole command like header and description, for example. A Command instance itself does not fully specify the CLI, a CommandLine has to be added to it to be able to function as a full command line spec. The CommandLine can be added by simply applying the command to a CommandLine instance. Example:

    command.header("My command") { for { level <- opt("level", "prod") .... } yield ... } }

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def noSpec[A](result: IO[A]): NoSpec[A]

    Permalink

    Directly specify an IO result in the command line processing context.

    Directly specify an IO result in the command line processing context. Lifts an IO into the CommandLineArgSpec monad context without any command line specification or argument processing taking place. Useful, for example, in the edge case when a command has no options yet but some header and description are already specified. An IO can be implicitly lifted into the CommandLineArgSpec context if the Sclap implicits are imported.

  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  18. def opt[T](name: String, aliases: String*)(implicit arg0: ArgumentValueParser[T]): Opt[T]

    Permalink

    Specifies a command line option with the given name.

    Specifies a command line option with the given name. The option is optional: it can be omitted on the command line and the result is of type Option[T].

    T

    The type of the option value.

  19. def param[T](implicit arg0: ArgumentValueParser[T]): Param[T]

    Permalink

    A command line (positional) parameter.

  20. def params[T](implicit arg0: ArgumentValueParser[T]): ParamRange[T]

    Permalink
  21. def subcommand[T](name: String, aliases: String*): Subcommand[T]

    Permalink

    Adds an existing command as a subcommand in the current command line context.

    Adds an existing command as a subcommand in the current command line context. Commands can be freely combined with each other using subcommand(...). Because of referential transparency and the hierarchic structure of subcommands, the same command definition can be reused or even serve both as a subcommand and as a main command in different contexts.

  22. def subcommands[A](subcommands: NonEmptyList[SubcommandWithCommandLine[_ <: A]]): CommandLine[A]

    Permalink
  23. def subcommands[A](subcommand: SubcommandWithCommandLine[A], otherSubcommands: SubcommandWithCommandLine[_ <: A]*): CommandLine[A]

    Permalink

    Takes a non-empty list of subcommands and returns the IO result of the first one that returns a non-error result when processing the arguments.

    Takes a non-empty list of subcommands and returns the IO result of the first one that returns a non-error result when processing the arguments. For example,

    for { r <- subcommands(sub1, sub2, sub3) } yield r

    is equivalent to

    for { r1 <- sub1 r2 <- sub2 r3 <- sub3 } yield r1 orElse r2 orElse r3

    and so on. It is effectively a way to select the subcommand that is invoked on the command line.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped