Prerequisites
Exception report
Remove-Item : A parameter cannot be found that matches parameter name 'ForceRemove-Item'.
At line:1 char:772
+ ... \main\res\drawable\file.xml" -ForceRemove-Item "C:\Project ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
Screenshot
N/A
Environment data
PS Version: 5.1.19041.6093
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 48
BufferHeight: 12
Steps to reproduce
- Open PowerShell in VS Code terminal
- Execute a long Remove-Item command with multiple file paths:
Remove-Item "C:\Project\file1.xml", "C:\Project\file2.xml", "C:\Project\file3.xml", "C:\Project\file4.xml", "C:\Project\file5.xml", "C:\Project\file6.xml", "C:\Project\file7.xml", "C:\Project\file8.xml" -Force
- Command gets corrupted during PSReadLine processing
- Error occurs with malformed parameter syntax
Expected behavior
The PowerShell command should execute properly without corruption:
- File paths should maintain proper backslash characters ()
- Parameters should remain separate (-Force should not concatenate)
- Multiple file deletion should complete successfully
Actual behavior
The command gets corrupted during execution:
- Backslashes () are replaced with hex escape sequences (\x5c)
- The -Force parameter gets concatenated becoming "-ForceRemove-Item"
- File paths are truncated and corrupted mid-execution
- Results in ParameterBindingException
Prerequisites
Exception report
Screenshot
N/A
Environment data
Steps to reproduce
Remove-Item "C:\Project\file1.xml", "C:\Project\file2.xml", "C:\Project\file3.xml", "C:\Project\file4.xml", "C:\Project\file5.xml", "C:\Project\file6.xml", "C:\Project\file7.xml", "C:\Project\file8.xml" -Force
Expected behavior
The PowerShell command should execute properly without corruption:
Actual behavior
The command gets corrupted during execution: