moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
3.35k stars 113 forks source link

'Terminal > Windows PowerShell' pathing issue #359

Closed qx6ghqkz closed 3 months ago

qx6ghqkz commented 11 months ago

If attempting to open a PowerShell window via 'Terminal > Windows PowerShell' from a directory which includes a space, the following error is received in the resultant PowerShell window:

Set-Location : A positional parameter cannot be found that accepts argument '[path\after\space\.]'.
At line:1 char:1
+ Set-Location -Path [path]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

I think the solution is to change the command 'Set-Location -Path [path]' to the following with the path enclosed in quotation marks:

Set-Location "[path]"