From 4b43e070ca35133ce8e4f998dba41079ba4bf106 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Mon, 27 Sep 2010 18:49:13 -0400 Subject: [PATCH] handle empty arguments case correctly --- main/Command.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/Command.scala b/main/Command.scala index d6c8efec3..2b58cc6e5 100644 --- a/main/Command.scala +++ b/main/Command.scala @@ -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 {