Intellisense/Regions.Autocompleter.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ScriptBlock = {
  param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
  (Get-AWSRegion).Region -match $wordToComplete
}

$Completer = @{
    CommandName = @(
        'Compare-CMEC2WindowsSpotPricingToOndemand'
        'Get-CmEc2ImageId'
        'Get-CmEc2Instances'
        'Get-CmEc2InstanceTypes'
        'Get-Ec2WindowsOndemandPrice'
        'New-CmEC2Instance'
        'Send-CMSSMPowerShell'
        'Set-CmEc2DnsName'
        'Set-CMEC2InstanceType'
        'Start-CmEc2Instance'
        'Stop-CMAllInstances'
        'Stop-CmEc2InstanceWait'
    )
    ParameterName = 'Region'
    ScriptBlock   = $ScriptBlock
    }
Register-ArgumentCompleter @Completer