Skip to content

Commit 4264d4f

Browse files
committed
fixup! repl: add auto‑completion for dynamic import calls
1 parent 39289e4 commit 4264d4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/repl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,9 @@ function complete(line, callback) {
13191319
return;
13201320
}
13211321

1322-
const extension = path.extname(name);
13231322
if (!dirent.isDirectory()) {
1324-
if (StringPrototypeIncludes(extensions, extension) && !subdir) {
1323+
const extension = path.extname(name);
1324+
if (StringPrototypeIncludes(extensions, extension)) {
13251325
ArrayPrototypePush(group, `${subdir}${name}`);
13261326
}
13271327
return;
@@ -1345,7 +1345,7 @@ function complete(line, callback) {
13451345
}
13461346

13471347
if (!subdir) {
1348-
ArrayPrototypePush(completionGroups, nodeSchemeBuiltinLibs, _builtinLibs);
1348+
ArrayPrototypePush(completionGroups, _builtinLibs, nodeSchemeBuiltinLibs);
13491349
}
13501350
} else if (RegExpPrototypeTest(fsAutoCompleteRE, line) &&
13511351
this.allowBlockingCompletions) {

0 commit comments

Comments
 (0)