Closed csillikd closed 9 months ago
For the y/n scenario there is also https://github.com/ShaunLawrie/PwshSpectreConsole/blob/prerelease/PwshSpectreConsole/public/prompts/Read-SpectreConfirm.ps1
This could do with having the choice option exposed though thanks.
Once this is merged it will be in prerelease for a couple of weeks while I'm away from the computer. You'll be able to install the prerelease module with install-module PwshSpectreConsole -AllowPrerelease
(or update-module -allowprerelease)
Thx @ShaunLawrie!
I know the Confirm, but I needed something like [y/n/q/?] (y)
, similar to git add --patch
Add the missing Choices parameter to Read-SpectraText.
Usage:
Read-SpectreText -Question "Really?" -DefaultAnswer "y" -Choices @('y', 'n')
Appears:
Really? [y/n] (y):