aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
238 stars 79 forks source link

AWS Prefix, Prefix Consistency #48

Closed tommymaynard closed 2 years ago

tommymaynard commented 5 years ago

Expected Behavior

Cmdlets that are not specific to an AWS Service should always use the AWS Prefix in their name, after the verb and dash, but before the singular noun, or CamelCase singular nouns.

Current Behavior

Three cmdlets have long been inconsistent with the AWS prefix, prefixed commands. These are:

Possible Solution

I recommend that the above *-DefaultAWSRegion Cmdlets be renamed, and aliases be created that resolve to the three renamed cmdlets. The aliases should use the previous cmdlet names.

Alias Cmdlet
Clear-DefaultAWSRegion Clear-AWSDefaultRegion
Get-DefaultAWSRegion Get-AWSDefaultRegion
Set-DefaultAWSRegion Set-AWSDefaultRegion

Steps to Reproduce (for bugs)

$AWSToolsCommands = Get-Command -Module AWS.Tools.Common
Foreach ($Tool in $AWSToolsCommands) {
    If ($Tool.Name -notlike '*-AWS*') {
        (Get-Command -Name $Tool.Name).Name
    } # End If.
} # End Foreach.

Clear-DefaultAWSRegion
Get-DefaultAWSRegion
Set-DefaultAWSRegion

Context

As it stands now, there is a problem with command discovery due to the incorrect placement of this prefix.

PS > (Get-Command -Module AWS.Tools.Common | Measure-Object).Count
31
PS > (Get-Command -Name *-*AWS* -Module AWS.Tools.Common | Measure-Object).Count
31
PS > (Get-Command -Name *-AWS* -Module AWS.Tools.Common | Measure-Object).Count
28

Your Environment

matteo-prosperi commented 4 years ago

I agree with your point, we will look into this.

github-actions[bot] commented 2 years ago

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.