Skip to content

Tab expansion for cmdlet arguments prefers aliases #6150

Closed

Description

Steps to reproduce

I've experienced this with the Import-Module cmdlet, but it may be present in other cmdlets too. I've used the PowerShellGet module in my examples but it happens with every other module I've tried. The Import-Module cmdlet has a parameter MinimumVersion with the alias Version and the common parameter Verbose.

In the default PowerShell 6 console I type:

Import-Module PowerShellGet -ve

I then type [TAB] which results in:

Import-Module PowerShellGet -Version

Expected behavior

I expect that when I use tab completion with -v, -ve, or -ver, that the suggestions will cycle between -Version and -Verbose. After the second [TAB] key press I expect to see:

Import-Module PowerShellGet -Verbose

Actual behavior

After the second [TAB] key press I actually see:

Import-Module PowerShellGet -Version

If I type -ver and then [TAB], the behavior is the same; I only see -Version. If I type -v and then [TAB], the behavior is as expected, the suggestions cycle between -Version and -Verbose.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. iSazonov commented on Feb 14, 2018

    @iSazonov
    Collaborator

    David Johnston (@djohnst10) Thanks for your report!

    It is dup #1265

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

    Resolution-DuplicateWG-Interactive-IntelliSense

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions