Fixes tab completion of global keys

Fixes #1373
Fixes #6715

Following my own PR #2855 around `ThisBuild`, this attempts to fix the
tab completion of globally scoped keys from the shell.
This commit is contained in:
Eugene Yokota 2021-11-16 19:23:25 -05:00
parent 8f1c0f61a1
commit 6c68b843d5
2 changed files with 9 additions and 2 deletions

View File

@ -304,7 +304,12 @@ object Act {
case Some(ProjectRef(uri, _)) => index.keys(Some(BuildRef(uri)), conf, task)
case _ => Set()
}
val keys: Set[String] = index.keys(proj, conf, task) ++ buildKeys
val globalKeys: Set[String] =
proj match {
case Some(_) => index.keys(None, conf, task)
case _ => Set()
}
val keys: Set[String] = index.keys(proj, conf, task) ++ buildKeys ++ globalKeys
keyParser(keys)
}

View File

@ -118,14 +118,16 @@ object ClientTest extends AbstractServerTest {
"compileIncSetup",
"compileIncremental",
"compileJava",
"compileOrder",
"compileOutputs",
"compileProgress",
"compileScalaBackend",
"compileSplit",
"compilerCache",
"compilers",
)
assert(complete("compi") == expected)
assert(complete("compi").toVector == expected)
}
test("testOnly completions") { _ =>
val testOnlyExpected = Vector(