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 callingsys.exit(0)
on--help
or--version
.This was contributed as #74 by @metasim.
๐ other minor fixes and enhancements
- โ Adds
Read[Seq[(K,V)]]
, which parseskey=1,key=2
asList("key" -> "1","key" -> "2")
. #70 by @sonenko - โ Adds
Read[InetAddress]
, which parses an IP address usingjava.net.InetAddress.getByName
. #79 by @alexanderfefelov - โ Adds
Read[Duration]
, which parses30s
asDuration("30s")
. #86 by @serejja - Increases the limit of
unbounded()
args. #83 by @billonahill - ๐ Scala 2.9.x support is dropped.