Skip to content

Commit 38d17fc

Browse files
author
James Brundage
committed
feat: Namespace.get_Cmdlet ( Fixes #1139 )
1 parent e82ef3b commit 38d17fc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Types/Namespace/get_Cmdlet.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<#
2+
.SYNOPSIS
3+
Gets the cmdlets in the namespace.
4+
.DESCRIPTION
5+
Gets all the cmdlets in the namespace.
6+
#>
7+
if (-not $this.Pattern) { return }
8+
if (-not $global:AllCmdlets) {
9+
$global:AllCmdlets = $global:ExecutionContext.SessionState.InvokeCommand.GetCommands('*','Cmdlet',$true)
10+
}
11+
$global:AllCmdlets -match $this.Pattern

0 commit comments

Comments
 (0)