Scopt v3.1.0 Release Notes
Release Date: 2013-07-08 // almost 11 years ago-
string short options
๐ scopt 3.0 changed short options from
String
toChar
to enforce all short options to be a single character. In scopt 3.1opt
still usesChar
, but usingabbr("nk")
it supportsString
short options:val parser = new scopt.OptionParser[Config]("scopt") { head("scopt", "3.x") opt[Unit]('n', "netrc") opt[Unit]('k', "keepalive") action { (x, c) => c.copy(keepalive= true) } opt[Unit]("no-keepalive") abbr("nk") action { (x, c) => c.copy(keepalive = false) } }
๐ Grouped options are parsed greedily. For example, in the above
-nk
is parsed as--no-keepalive
; and-nknk
is parsed as--no-keepalive --netrc --keepalive
. #19๐ bug fixes and minor enhancements