Skip to content

Commit 1bc06fd

Browse files
committed
options
1 parent cf7658d commit 1bc06fd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bin/cli.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ async function main() {
4040
? args.slice(2)
4141
: null;
4242

43+
// When PowerShell drops '--', the cursor placeholder is lost; append an empty
44+
// arg so downstream completion logic knows the cursor is at a new token.
45+
if (
46+
isPowerShell &&
47+
dashIndex === -1 &&
48+
completionArgs &&
49+
completionArgs[completionArgs.length - 1] !== ''
50+
) {
51+
completionArgs.push('');
52+
}
53+
4354
if (!completionArgs) {
4455
console.error(`Error: Expected '--' followed by command to complete`);
4556
process.exit(1);

0 commit comments

Comments
 (0)