Scopt v3.4.0 Release Notes

Release Date: 2016-06-12 // almost 8 years ago
  • ๐Ÿ‘Œ support for optional equal sign

    ๐Ÿ“œ Given a parser like this:

    val intParser1 = new scopt.OptionParser[Config]("scopt") {
      head("scopt", "3.x")
      opt[Int]('f', "foo") action { (x, c) => c.copy(intValue = x) }
      help("help")
    }
    

    scopt 3.4.0 accepts all of the following options:

    • --foo 1
    • --foo:1
    • --foo=1

    This was contributed as #87 by @maizy.

    terminate

    scopt 3.4.0 adds a termination hanlder called terminate(exitState: Either[String, Unit]). Override this method to prevent scopt from calling sys.exit(0) on --help or --version.

    This was contributed as #74 by @metasim.

    ๐Ÿ›  other minor fixes and enhancements

    • โž• Adds Read[Seq[(K,V)]], which parses key=1,key=2 as List("key" -> "1","key" -> "2"). #70 by @sonenko
    • โž• Adds Read[InetAddress], which parses an IP address using java.net.InetAddress.getByName. #79 by @alexanderfefelov
    • โž• Adds Read[Duration], which parses 30s as Duration("30s"). #86 by @serejja
    • Increases the limit of unbounded() args. #83 by @billonahill
    • ๐Ÿ‘ Scala 2.9.x support is dropped.