Skip to content

Commit 031e522

Browse files
StartAutomatingStartAutomating
StartAutomating
authored and
StartAutomating
committed
feat: Namespace.get_Function ( Fixes #1140 )
1 parent 5b08d4e commit 031e522

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

PipeScript.types.ps1xml

+12
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,18 @@ $global:AllCmdlets -match $this.Pattern
27092709

27102710
</GetScriptBlock>
27112711
</ScriptProperty>
2712+
<ScriptProperty>
2713+
<Name>Function</Name>
2714+
<GetScriptBlock>
2715+
if (-not $this.Pattern) { return }
2716+
if (-not $global:AllFunctionsOrFilters) {
2717+
$global:AllFunctionsOrFilters = $global:ExecutionContext.SessionState.InvokeCommand.GetCommands('*','Function,Filter',$true)
2718+
}
2719+
foreach ($cmdPattern in $this.Pattern) {
2720+
$global:AllFunctionsOrFilters -match $cmdPattern
2721+
}
2722+
</GetScriptBlock>
2723+
</ScriptProperty>
27122724
<ScriptProperty>
27132725
<Name>Pattern</Name>
27142726
<GetScriptBlock>

0 commit comments

Comments
 (0)