Closed
Description
I'm running preview but I think this may be in the release as well.
psreadline can save your passwords to its plaintext log. To prevent this leeholmes put out a little fragment
Set-PSReadLineOption -AddToHistoryHandler {
param([string]$line)
$sensitive = "password|asplaintext|token|key|secret"
return ($line -notmatch $sensitive)
}
I found this was hanging my Intergrated console (but not a PowerShell terminal) in VS Code.
easy to repro
ensure you have the integrated console selected.
Run a command.
paste in
Set-PSReadLineOption -AddToHistoryHandler {param([string]$line) return $true}
Re-run the previous command
This may be a psreadline bug but it only occurs in the integrated console.