internal/tepp/scripts/config-module.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
#region Tepp Data return: Module Name
$ScriptBlock = {
    param (
        $commandName,
        
        $parameterName,
        
        $wordToComplete,
        
        $commandAst,
        
        $fakeBoundParameter
    )
    
    $start = Get-Date
    [PSFramework.TabExpansion.TabExpansionHost]::Scripts["config-module"].LastExecution = $start
    
    foreach ($name in ([PSFramework.Configuration.ConfigurationHost]::Configurations.Values.Module | Select-Object -Unique | Where-Object { $_ -Like "$wordToComplete*" } | Sort-Object))
    {
        New-PSFTeppCompletionResult -CompletionText $name -ToolTip $name
    }
    [PSFramework.TabExpansion.TabExpansionHost]::Scripts["config-module"].LastDuration = (Get-Date) - $start
}

Register-PSFTeppScriptblock -ScriptBlock $ScriptBlock -Name "config-module"
#endregion Tepp Data return: Module Name