File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -2235,21 +2235,23 @@ $distinctCommands = @{}
2235
2235
Gets unique templates related to a language.
2236
2236
#>
2237
2237
$distinctCommands = @{}
2238
- ,@(foreach ($psProperty in $this.PSObject.properties) {
2238
+ $ThisPSObject = $this.PSObject
2239
+ $theseProperties = @($this.PSObject.properties)
2240
+ foreach ($psProperty in $theseProperties) {
2239
2241
if ($psProperty -isnot [psnoteproperty]) { continue }
2240
2242
if ($psProperty.Value -isnot [Management.Automation.CommandInfo]) { continue }
2241
- if (
2242
- $psProperty.Value -is [Management.Automation.AliasInfo] -and
2243
- (
2244
- $distinctCommands[$psProperty.Value .ResolvedCommand] -or
2245
- $this.PSObject. Properties[$psProperty.Value. ResolvedCommand.Name]
2246
- )
2247
- ) {
2248
- continue
2243
+ if ($psProperty.Value -is [Management.Automation.AliasInfo]) {
2244
+ $aliasInfo = $psProperty.Value
2245
+ if (
2246
+ $distinctCommands[$aliasInfo .ResolvedCommand] -or
2247
+ $ThisPSObject. Properties[$aliasInfo. ResolvedCommand.Name -replace 'Template\p{P}' ]
2248
+ ) {
2249
+ continue
2250
+ }
2249
2251
}
2250
2252
$distinctCommands[$psProperty.Value] = $psProperty.Value
2251
2253
$psProperty.Value
2252
- })
2254
+ }
2253
2255
</GetScriptBlock >
2254
2256
</ScriptProperty >
2255
2257
</Members >
You can’t perform that action at this time.
0 commit comments