internal/TEPP/scripts/userprofile.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$scriptBlock = {
    param (
        $commandName,
        
        $parameterName,
        
        $wordToComplete,
        
        $commandAst,
        
        $fakeBoundParameter
    )
    
    $names = Get-ChildItem "$env:SystemDrive\Users" -Force | Where-Object PSIsContainer | Expand-PSUObject Name | Where-Object { $_ -like "$wordToComplete*" } | Sort-Object
    
    foreach ($name in $names)
    {
        New-PSFTeppCompletionResult -CompletionText $name -ToolTip $name
    }
}
Register-PSFTeppScriptblock -ScriptBlock $scriptBlock -Name psutil-userprofile