Scala scopt 2.0.1ライブラリに新しい不変OptionParserを使用しようとしています。 OptionParserは、ジェネリック型を取り、ヘルプメソッドがすでにUnitを返すアクションを定義するので、私は、コンパイル時エラーを取得しています: case class Config(directory: String = null)
val parser = new Optio
私はコマンドライン引数を処理するためにscoptを使用していますが、ブラインド/ラベルなしの引数を受け入れたいと思います。 ls
ls --tree
ls . --tree
ls /foo/bar
ls /foo/bar --tree
scoptライブラリが簡単にオプションを処理することができ、以下のように定義何かを持っています ls [<selector>] [options]
をvalの定義: import java.io.File
object Application extends App {
case class Config(in: File = new File("."), out: File = new File("."), scripts: Seq[File] = Seq())
val parser = new scopt.Op