PS version: 5.1.17763.134
PSReadline version: 1.2
os: 10.0.17763.289 (WinBuild.160101.0800)
PS file version: 10.0.17763.289 (WinBuild.160101.0800)
Here is a screenshot before Windows update.
We are using the arrow keys to select the text and the DEL key to delete the text.
Notice the syntax highlighting.
Then, after Windows update, here is what happens:
Are you using a non-en-US keyboard layout?
This doesn't present itself whilst using an en-gb keyboard layout.
Though this looks like PSReadline is not enabled in the 2nd screen capture so can you confirm that PSReadline is actually installed and imported in this particular session ?
There's a known issue where PSReadLine doesn't start on some keyboard layouts. This has since been fixed in newest Win10 builds, but hasn't been accepted for servicing yet. Wanted to confirm this is that issue.
I'm not sure whether PSReadLine is started in the second screenshot. However, the report shown from in the Environment Data above comes from the same console and indicates version 1.2 of PSRL.
We are indeed using a non en-US keyboard layout.
Got the same issue, even with the latest version of PSReadLine (2.0.0-beta3)
The working PowerShell was launched with en-UK layout, the other with fr-FR
Edit:
PowerShell Version 5.1.17763.134
Windows 10 Pro 10.0.17763.0
This happened to me when I updated my desktop PC on October with the October update.
Today my laptop updated itself and here we go again.. PSReadLine is missing/doesn't work idk why
PS version: 5.1.17763.316
PSReadline version: 2.0.0-beta2
os: 10.0.17763.1 (WinBuild.160101.0800)
PS file version: 10.0.17763.1 (WinBuild.160101.0800)
I start CMDer after installing the newest windows update.
I get the following error.
Set-PSReadlineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
At C:\tools\Cmder\vendor\profile.ps1:88 char:5
+ Set-PSReadlineOption -ExtraPromptLineCount 1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-PSReadLineOption], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.SetPSReadLineOption
Set-PSReadlineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
At C:\tools\Cmder\config\user_profile.ps1:32 char:1
+ Set-PSReadlineOption -EditMode vi
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-PSReadLineOption], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.SetPSReadLineOption
Running the following commands gets the following returns.
C:\ProgramData\chocolatey\lib
位 Get-PSReadLineOption
Get-PSReadLineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
At line:1 char:1
+ Get-PSReadLineOption
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PSReadLineOption], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.GetPSReadLineOption
C:\ProgramData\chocolatey\lib
位 install-module psreadline
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
WARNING: Version '2.0.0' of module 'PSReadline' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0'. To install version '1.2', run Install-Module and add the -Force parameter, this command will install version '1.2' in side-by-side with version '2.0.0'.
(note i'm not going to change my keyboard layout to test if it wil work becouse it is a mess)
I'm using the belgian period keyboard layout.
I can also confirm that launching Powershell with a US English keyboard imports PSReadLine fine, but launching with my keyboard as Programmer Dvorak, it does not work.
If I launch with US and switch to PD, that works. Not ideal but is a workaround.
We're working on a beta4 release of 2.0.0 that should address this.
Please try https://www.powershellgallery.com/packages/PSReadLine/2.0.0-beta4
If we can get feedback this resolves this problem and doesn't introduce new ones, I can see about getting it into Windows PowerShell
@SteveL-MSFT it's working! thanks
On a newly installed PowerShell 6.2.3
I still had this issue: I have Import-Module PSReadLine
in my profile but it was correctly imported only in one (Estonian) of the three keyboard layouts I am using (Estonian, Italian and English US).
Get-Module -ListAvailable PSReadLine
only shows 2.0.0
as version, it does not show which beta version I have.
I ran anyway the following command:
Install-Module -Name PSReadLine -RequiredVersion 2.0.0-beta5 -AllowPrerelease
and the issue got fixed.
Going through old keyboard layout related issues ...
It looks to me this one is resolved, so close it.
Most helpful comment
We're working on a beta4 release of 2.0.0 that should address this.