handle empty arguments case correctly

This commit is contained in:
Mark Harrah 2010-09-27 18:49:13 -04:00
parent a2300c7dc0
commit 4b43e070ca
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ trait TaskSetup
final case class Input(line: String, cursor: Option[Int])
{
lazy val (name, arguments) = line match { case Input.NameRegex(n, a) => (n, a); case _ => (line, "") }
lazy val splitArgs = (arguments split """\s+""").toSeq
lazy val splitArgs: Seq[String] = if(arguments.isEmpty) Nil else (arguments split """\s+""").toSeq
}
object Input
{