You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did some more digging and I'm not sure this qualifies as a bug anymore, at least not one against PSReadline, although it might still be a bug against vscode-powershell.
From the days before VSCode supported PSReadline I had a condition in my profile to remove-module PSReadline -Force if the profile wasn't running in ConsoleHost. I never even realized that this still existed as PSReadline was happily working in VSCode.
Interestingly calling Remove-Module PSReadline -Force from the integrated terminal after my profile has loaded works without issue. It's just when I do it from my profile that it breaks.
I suspect that the vscode-powershell integration with PSReadline has a custom handler for unloading psreadline that doesn't work correctly if PSReadline is unloaded by the profile.
Not sure if that qualifies as a bug or not, truthfully.
Steps to reproduce:
Create profile that calls Remove-Module PSReadline -Force
Ensure "load profile" option is enabled for integrated terminal
Start an integrated terminal (e.g. by opening a powershell file)
Observe error
Environment
PSReadLine: 2.2.0-beta1
PowerShell: 2020.6.0
OS: Microsoft Windows 10.0.19042
BufferWidth: 128
BufferHeight: 12
Thanks @MartinSGill this error likely occurs because we load the profile just before the integrated console has loaded...this may inadvertently be changed by #1295
Issue migrated from PSReadline repo. cf. PowerShell/PSReadLine#1967
Quoted From: PowerShell/PSReadLine#1967 (comment)
Steps to reproduce:
Remove-Module PSReadline -Force
Environment
PSReadLine: 2.2.0-beta1
PowerShell: 2020.6.0
OS: Microsoft Windows 10.0.19042
BufferWidth: 128
BufferHeight: 12
VSCode:
Powershell:
The text was updated successfully, but these errors were encountered: