mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Merge pull request #2558 from Feodoric/autocomplete-with-no-leading-slash
Fixes autocomplete for scripts in directory without using leading slash
This commit is contained in:
commit
fa0f5cb451
@ -299,7 +299,7 @@ export async function determineAllPossibilitiesForTabCompletion(
|
||||
const filename = command[1] + "";
|
||||
if (!isScriptFilename(filename)) return; // Not a script.
|
||||
if (filename.endsWith(".script")) return; // Doesn't work with ns1.
|
||||
const script = currServ.scripts.find((script) => script.filename === filename);
|
||||
const script = currServ.scripts.find((script) => script.filename === filename || script.filename === '/' + filename);
|
||||
if (!script) return; // Doesn't exist.
|
||||
if (!script.module) {
|
||||
await compile(p, script, currServ.scripts);
|
||||
|
Loading…
Reference in New Issue
Block a user