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 to Char to enforce all short options to be a single character. In scopt 3.1 opt still uses Char, but using abbr("nk") it supports String 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

    • ๐Ÿ‘‰ Uses Console.err instead of System.err #18 contributed by @kxbmap.