File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 Gets unique templates related to a language.
66#>
77$distinctCommands = @ {}
8- , @ (foreach ($psProperty in $this.PSObject.properties ) {
8+ $ThisPSObject = $this.PSObject
9+ $theseProperties = @ ($this.PSObject.properties )
10+ foreach ($psProperty in $theseProperties ) {
911 if ($psProperty -isnot [psnoteproperty ]) { continue }
1012 if ($psProperty.Value -isnot [Management.Automation.CommandInfo ]) { continue }
11- if (
12- $psProperty .Value -is [ Management.Automation.AliasInfo ] -and
13- (
14- $distinctCommands [$psProperty .Value .ResolvedCommand ] -or
15- $this .PSObject. Properties [$psProperty .Value. ResolvedCommand.Name ]
16- )
17- ) {
18- continue
13+ if ($psProperty .Value -is [ Management.Automation.AliasInfo ]) {
14+ $aliasInfo = $psProperty .Value
15+ if (
16+ $distinctCommands [$aliasInfo .ResolvedCommand ] -or
17+ $ThisPSObject . Properties [$aliasInfo . ResolvedCommand.Name -replace ' Template\p{P} ' ]
18+ ) {
19+ continue
20+ }
1921 }
2022 $distinctCommands [$psProperty.Value ] = $psProperty.Value
2123 $psProperty.Value
22- })
24+ }
You can’t perform that action at this time.
0 commit comments