Powershell: [PowerShell 7 Preview 3] Typing commands with different casing returns different suggestions

Created on 15 Sep 2019  路  5Comments  路  Source: PowerShell/PowerShell

This behavior exists on both, Windows and Linux.

For example:
Windows: Compare the suggestions for get-wineven and Get-WinEven
Linux: Compare the suggestions for get-even and Get-Even

Issue-Question Resolution-Fixed WG-Engine

All 5 comments

I'm not seeing this on my system. 馃

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.3
PSEdition                      Core
GitCommitId                    7.0.0-preview.3
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Both casing variants tab complete to Get-WinEvent for me.

I'm not talking about tab completion. :)
I'm talking about suggestions when you mistype a command:

PS C:\> get-wineven
get-wineven : The term 'get-wineven' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggestion [4,General]: The most similar commands are: Get-WinEvent, New-WinEvent.

PS C:\> Get-WinEven
Get-WinEven : The term 'Get-WinEven' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggestion [4,General]: The most similar commands are: Get-WinEvent, New-WinEvent, Get-Event, Get-ASREvent.

Ahh, gotcha.

@SteveL-MSFT something to do with the string similarity algorithm, perhaps?

Fix pulled.

:tada:This issue was addressed in #10549, which has now been successfully released as v7.0.0-preview.5.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings