mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Fixes autocomplete when running script in a directory without using leading slash
Fixes #1681
This commit is contained in:
parent
0bbe060074
commit
26ef94b062
@ -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