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
{{ message }}
Repository navigation
Tab expansion for cmdlet arguments prefers aliases #6150
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
iSazonov commentedon Feb 14, 2018
David Johnston (@djohnst10) Thanks for your report!
It is dup #1265