Skip to content

[PowerShell 7 Preview 3] Typing commands with different casing returns different suggestions #10546

Closed

Description

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

Activity

  1. added
    Issue-Question
    on Sep 15, 2019
  2. vexx32 commented on Sep 15, 2019

    @vexx32
    Collaborator

    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.

  3. alexandair commented on Sep 15, 2019

    @alexandair
    ContributorAuthor

    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.
  4. vexx32 commented on Sep 15, 2019

    @vexx32
    Collaborator

    Ahh, gotcha.

    Steve Lee (@SteveL-MSFT) something to do with the string similarity algorithm, perhaps?

  5. iSazonov commented on Sep 16, 2019

    @iSazonov
    Collaborator

    Fix pulled.

  6. added
    WG-Engine
    on Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-QuestionResolution-FixedWG-Engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions