File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,10 @@ async function main() {
4141 const completion = new PackageManagerCompletion ( packageManager ) ;
4242 await setupCompletionForPackageManager ( packageManager , completion ) ;
4343 let toComplete = args . slice ( 2 ) ;
44- // In PowerShell, -- is stripped. Only append it if the last arg is a flag
45- // (starts with -), meaning we want flag/option completion
46- if ( toComplete . length > 0 && toComplete [ toComplete . length - 1 ] . startsWith ( '-' ) ) {
47- toComplete = [ ...toComplete , '-- ' ] ;
44+ // In PowerShell, -- is stripped. Append empty string to simulate space at end
45+ // This lets the parser know we want completions for what comes after the last arg
46+ if ( toComplete . length > 0 ) {
47+ toComplete = [ ...toComplete , '' ] ;
4848 }
4949 await completion . parse ( toComplete ) ;
5050 process . exit ( 0 ) ;
You can’t perform that action at this time.
0 commit comments