summaryrefslogtreecommitdiff
path: root/project/PartestUtil.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-02-10 12:26:41 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-02-11 22:20:38 +1000
commit39a858de7a65b70ae35ce460e7746cae5e4d3fc4 (patch)
tree54aff920f4b150f0fe8bdd2d8eea7612ef7ffac3 /project/PartestUtil.scala
parent8f8f81b72ef07140952aeb76120bd032e35cc918 (diff)
downloadscala-39a858de7a65b70ae35ce460e7746cae5e4d3fc4.tar.gz
scala-39a858de7a65b70ae35ce460e7746cae5e4d3fc4.tar.bz2
scala-39a858de7a65b70ae35ce460e7746cae5e4d3fc4.zip
Fix SBT tab completion of scala command
`scala -deprecation` (without a trailing script argument) wasn't allowed. Now it is. I also supported trailing whitespace on all commands. Also fixed: a bug with completion of `scalac ./san<TAB>`. It was completing as though the `./` had not been typed, which threw the suggestion off by a few characters.
Diffstat (limited to 'project/PartestUtil.scala')
-rw-r--r--project/PartestUtil.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/project/PartestUtil.scala b/project/PartestUtil.scala
index 0c0c677a6f..4b18c94b47 100644
--- a/project/PartestUtil.scala
+++ b/project/PartestUtil.scala
@@ -87,6 +87,6 @@ object PartestUtil {
opt + " " + path
}
val P = oneOf(knownUnaryOptions.map(x => token(x))) | SrcPath | TestPathParser | Grep
- (Space ~> repsep(P, oneOrMore(Space))).map(_.mkString(" ")).?.map(_.getOrElse(""))
+ (Space ~> repsep(P, oneOrMore(Space))).map(_.mkString(" ")).?.map(_.getOrElse("")) <~ OptSpace
}
}