|
1 |
| -# Complete the Name parameter for all *GitHubEnvironment commands |
2 |
| -Register-ArgumentCompleter -CommandName ($script:PSModuleInfo.FunctionsToExport | |
| 1 | +Register-ArgumentCompleter -CommandName ($script:PSModuleInfo.FunctionsToExport | |
3 | 2 | Where-Object { $_ -like '*GitHubEnvironment' }) -ParameterName Name -ScriptBlock {
|
4 |
| - param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) |
5 |
| - $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter |
6 |
| - |
| 3 | + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) |
| 4 | + $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters |
7 | 5 | $params = @{
|
8 |
| - Owner = $fakeBoundParameter.Owner |
9 |
| - Repository = $fakeBoundParameter.Repository |
10 |
| - Context = $fakeBoundParameter.Context |
| 6 | + Owner = $fakeBoundParameters.Owner |
| 7 | + Repository = $fakeBoundParameters.Repository |
| 8 | + Context = $fakeBoundParameters.Context |
| 9 | + Verbose = $false |
| 10 | + Debug = $false |
11 | 11 | }
|
12 | 12 | $params | Remove-HashtableEntry -NullOrEmptyValues
|
13 | 13 | Get-GitHubEnvironment @params | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
14 | 14 | [System.Management.Automation.CompletionResult]::new($_.Name, $_.Name, 'ParameterValue', $_.Name)
|
15 | 15 | }
|
16 | 16 | }
|
17 | 17 |
|
18 |
| -# Complete the Environment parameter for all functions in the module |
19 | 18 | Register-ArgumentCompleter -CommandName ($script:PSModuleInfo.FunctionsToExport) -ParameterName Environment -ScriptBlock {
|
20 |
| - param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) |
21 |
| - $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter |
22 |
| - |
| 19 | + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) |
| 20 | + $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters |
23 | 21 | $params = @{
|
24 |
| - Owner = $fakeBoundParameter.Owner |
25 |
| - Repository = $fakeBoundParameter.Repository |
26 |
| - Context = $fakeBoundParameter.Context |
| 22 | + Owner = $fakeBoundParameters.Owner |
| 23 | + Repository = $fakeBoundParameters.Repository |
| 24 | + Context = $fakeBoundParameters.Context |
| 25 | + Verbose = $false |
| 26 | + Debug = $false |
27 | 27 | }
|
28 | 28 | $params | Remove-HashtableEntry -NullOrEmptyValues
|
29 | 29 | Get-GitHubEnvironment @params | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
|
0 commit comments