internal/tepp/scripts/config-fullname.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: FullName
$ScriptBlock = {
    param (
        $commandName,
        
        $parameterName,
        
        $wordToComplete,
        
        $commandAst,
        
        $fakeBoundParameter
    )
    
    $start = Get-Date
    [PSFramework.TabExpansion.TabExpansionHost]::Scripts["config-fullname"].LastExecution = $start
    
    foreach ($name in ([PSFramework.Configuration.ConfigurationHost]::Configurations.Values | Where-Object { -not $_.Hidden -and ($_.FullName -Like "$wordToComplete*") } | Select-Object -ExpandProperty FullName | Sort-Object))
    {
        New-PSFTeppCompletionResult -CompletionText $name -ToolTip $name
    }
    [PSFramework.TabExpansion.TabExpansionHost]::Scripts["config-fullname"].LastDuration = (Get-Date) - $start
}

Register-PSFTeppScriptblock -ScriptBlock $ScriptBlock -Name "config-fullname"
#endregion Tepp Data return: FullName