Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simplest and dumb command line option parser for Scala
Scala
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
project
src
.gitignore
README

README

Simplest and dumb command line option parser for Scala.

Usage:

  object MyApp {
    import ru.braintrace.optionparser.OptionParser

    def main(args: Array[String]) {
      val p = new OptionParser
      p.addOption("o", Some("option"))
      p.addFlagOption("f", Some("flag"))

      val (options, args) = p.parseArgs(args)

      val option: Option[String] = options.get("o") // or options.get("option")
      // ...

      if (options.get("flag").isDefined) { // or options.get("f")
        // ...
      }
    }
  }

That's all.
Something went wrong with that request. Please try again.