mirror of https://github.com/sbt/sbt.git
Merge pull request #6716 from eed3si9n/wip/global-keys
Fixes tab completion of global keys
This commit is contained in:
commit
aa22c02d84
|
|
@ -304,7 +304,12 @@ object Act {
|
||||||
case Some(ProjectRef(uri, _)) => index.keys(Some(BuildRef(uri)), conf, task)
|
case Some(ProjectRef(uri, _)) => index.keys(Some(BuildRef(uri)), conf, task)
|
||||||
case _ => Set()
|
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)
|
keyParser(keys)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,14 +118,16 @@ object ClientTest extends AbstractServerTest {
|
||||||
"compileIncSetup",
|
"compileIncSetup",
|
||||||
"compileIncremental",
|
"compileIncremental",
|
||||||
"compileJava",
|
"compileJava",
|
||||||
|
"compileOrder",
|
||||||
"compileOutputs",
|
"compileOutputs",
|
||||||
"compileProgress",
|
"compileProgress",
|
||||||
"compileScalaBackend",
|
"compileScalaBackend",
|
||||||
"compileSplit",
|
"compileSplit",
|
||||||
|
"compilerCache",
|
||||||
"compilers",
|
"compilers",
|
||||||
)
|
)
|
||||||
|
|
||||||
assert(complete("compi") == expected)
|
assert(complete("compi").toVector == expected)
|
||||||
}
|
}
|
||||||
test("testOnly completions") { _ =>
|
test("testOnly completions") { _ =>
|
||||||
val testOnlyExpected = Vector(
|
val testOnlyExpected = Vector(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue