scala.tools.cmd

DemoSpec

trait DemoSpec extends Spec with StdOpts with Interpolation

A sample command specification for illustrative purposes. First take advantage of the meta-options:

// this command creates an executable runner script "demo" % scala scala.tools.cmd.Demo --self-update demo

// this one creates and sources a completion file - note backticks % ./demo --bash

// and now you have a runner with working completion % ./demo --<tab> --action --defint --int --bash --defstr --str --defenv --self-update --unary

The normal option configuration is plausibly self-explanatory.

Source
Demo.scala
Linear Supertypes
Interpolation, StdOpts, Spec, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DemoSpec
  2. Interpolation
  3. StdOpts
  4. Spec
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract type OptionMagic <: Implicit

    Definition Classes
    Spec

Abstract Value Members

  1. abstract def help(str: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Spec
  2. implicit abstract def optionMagicAdditions(s: String): OptionMagic

    Attributes
    protected
    Definition Classes
    Spec

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Bash extends Opt

    I think we're as close as we can get to bundling completion with the program given the constraints imposed by bash.

  7. object SelfUpdate extends Opt

    Generates a very basic runner script.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. def heading(str: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Spec
  16. object interpolate extends AnyRef

  17. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val optDefault: String

  22. val optDefaultInt: Int

  23. val optEnv: String

  24. val optExpand: Unit

  25. val optIsUnary: Boolean

  26. val optopt: Option[String]

  27. val optoptInt: Option[Int]

  28. lazy val programInfo: Info

    Definition Classes
    DemoSpecSpec
  29. lazy val referenceSpec: scala.tools.cmd.DemoSpec.type

    Definition Classes
    DemoSpecSpec
  30. val selfUpdateName: Option[String]

    Definition Classes
    StdOpts
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. final def wait(arg0: Long, arg1: Int): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Interpolation

Inherited from StdOpts

Inherited from Spec

Inherited from AnyRef

Inherited from Any