We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 657e684 commit b9fa951Copy full SHA for b9fa951
bin/cli.ts
@@ -31,9 +31,11 @@ async function main() {
31
// When PowerShell shims drop the literal '--', fall back to treating
32
// everything after "complete" as the completion payload.
33
const completionArgs =
34
- dashIndex !== -1
+ // POSIX or already-present separator
35
+ (dashIndex !== -1 && (!isPowerShell || dashIndex < process.argv.length - 1))
36
? process.argv.slice(dashIndex + 1)
37
: isPowerShell
38
+ // PowerShell shims may drop the first '--' and leave only a trailing one
39
? args.slice(2)
40
: null;
41
0 commit comments