Fixes autocomplete when running script in a directory without using leading slash

Fixes #1681
This commit is contained in:
Russell Stringer 2022-01-11 12:05:32 -05:00
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);