mirror of https://github.com/sbt/sbt.git
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:
parent
8f1c0f61a1
commit
6c68b843d5
|
|
@ -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