| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1193,7 +1193,7 @@ function complete(line, callback) { | |||
| 1193 | 1193 | d.name.startsWith(baseName)) | |
| 1194 | 1194 | .map((d) => d.name); | |
| 1195 | 1195 | completionGroups.push(filteredValue); | |
| 1196 | - completeOn = filePath; | ||
| 1196 | + completeOn = baseName; | ||
| 1197 | 1197 | } catch {} | |
| 1198 | 1198 | } | |
| 1199 | 1199 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,6 +28,7 @@ const { | |||
| 28 | 28 | restoreStderr | |
| 29 | 29 | } = require('../common/hijackstdio'); | |
| 30 | 30 | const assert = require('assert'); | |
| 31 | + const path = require('path'); | ||
| 31 | 32 | const fixtures = require('../common/fixtures'); | |
| 32 | 33 | const hasInspector = process.features.inspector; | |
| 33 | 34 | ||
@@ -434,6 +435,16 @@ testMe.complete('obj.', common.mustCall((error, data) => { | |||
| 434 | 435 | assert.strictEqual(data[0].length, 0); | |
| 435 | 436 | }) | |
| 436 | 437 | ); | |
| 438 | + | ||
| 439 | + const testPath = fixturePath.slice(0, -1); | ||
| 440 | + testMe.complete(testPath, common.mustCall((err, data) => { | ||
| 441 | + assert.strictEqual(err, null); | ||
| 442 | + assert.ok(data[0][0].includes('test-repl-tab-completion')); | ||
| 443 | + assert.strictEqual( | ||
| 444 | + data[1], | ||
| 445 | + path.basename(testPath) | ||
| 446 | + ); | ||
| 447 | + })); | ||
| 437 | 448 | }); | |
| 438 | 449 | } | |
| 439 | 450 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments