-
Notifications
You must be signed in to change notification settings - Fork 5
Description
My investigation revealed that PowerShell "swallows" double dashes. See npm/cli#3136 (comment).
Therefore, https://github.com/bombshell-dev/tab/blob/main/src/powershell.ts#L74 doesn't seem to work in practice, at least not during my local pnpm link development tests - argv doesn't receive the double dash at all.
I suggest modifying the code as follows, but not sure if this is the correct approach:
- $RequestComp = "& ${exec} complete -- $Arguments"
+ $QuotedArgs = ($Arguments -split ' ' | ForEach-Object { "'" + ($_ -replace "'", "''") + "'" }) -join ' '
+ __${name}_debug "QuotedArgs: $QuotedArgs"
+ $RequestComp = "& ${exec} complete '--' $QuotedArgs"Here's the screenshot of process.argv.slice(2)

Metadata
Metadata
Assignees
Labels
No labels