jdhitsolutions / PSTeachingTools

:mortar_board: A set of commands and tools for teaching PowerShell. The module should work in Windows PowerShell, PowerShell 7.x and run cross-platform.
MIT License
48 stars 22 forks source link

Argument completer does not work well with veggies with blanks #10

Closed andreasjordan closed 2 years ago

andreasjordan commented 2 years ago

The argument completer does not put quotes around those veggies that have a blank in the name like "russet potato". Don't know the solution right now but will try to research...

andreasjordan commented 2 years ago

Maybe use this: https://issueexplorer.com/issue/PowerShell/SecretManagement/91 $completionText = if ($_ -match '\s') { "'$_'" } else { $_ }

jdhitsolutions commented 2 years ago

I've come across this in my other projects. Your solution is on the right track. Thanks for bringing up this issue.

jdhitsolutions commented 2 years ago

This should be fixed in v4.1.0 if you want to update the module and try again.

andreasjordan commented 2 years ago

Yes! Thanks a lot for the quick fix.