Public/Get-ModuleProject.ps1
function Get-ModuleProject { [CmdletBinding(PositionalBinding=$false)] param( [String] $ModuleProject ) $ModuleProjects = if ($ModuleProject) { @($ModuleProject) } else { (GetModuleProjectInfo).Name } foreach($Module in $ModuleProjects) { $ModuleInfo = New-Object PSObject -Property @{ Name = $Module Function = @() Alias = @() } $Commands = GetCommandsInModuleProject -ModuleProject $Module foreach($CommandName in $Commands) { if ((GetModuleProjectTypeForCommand -CommandName $CommandName) -eq 'Function') { $ModuleInfo.Function += @($CommandName) } else { $ModuleInfo.Alias += @($CommandName) } } $ModuleInfo #yield return } } Register-ArgumentCompleter -CommandName Get-ModuleProject -ParameterName ModuleProject -ScriptBlock (Get-Command ModuleProjectArgumentCompleter).ScriptBlock |