0

User Input has two words in it. for e.g. "Reflect UI" When the user presses the space key it treats "UI" as a 2nd word. You can see this also in the color change of the 2nd word. (changes to purple) Is there a way to write the read-host prompt to allow a user to input two words that are supposed to be treated as one word? Hopefully this makes sense. Believe it or not I have searched everywhere and for some reason no one has a solution.

enter image description here

Costa
  • 39
  • 6
  • 3
    Ignore the syntax highlighting in ISE - `Read-Host` will still return 1(!) string, not two – Mathias R. Jessen Apr 11 '23 at 16:43
  • Prove: `(Read-Host).Count` – iRon Apr 11 '23 at 17:01
  • [The PowerShell ISE is no longer in active feature development](https://learn.microsoft.com/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise#support). [Windows terminal](https://learn.microsoft.com/en-us/windows/terminal/) has a more sophisticated syntax highlighting. – iRon Apr 11 '23 at 17:04
  • 1
    This whole time it was ISE confusing me. thanks! – Costa Apr 11 '23 at 17:24

0 Answers0