File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11foreach ($file in (Get-ChildItem - Path " $psScriptRoot " - Filter " *-*" - Recurse)) {
2- if ($file.Extension -ne ' .ps1' ) { continue }
2+ if ($file.Extension -ne ' .ps1' ) { continue } # Skip if the extension is not .ps1
3+ if ($file.Name -match ' \.ps1\.ps1$' ) { continue } # Skip if the file is a source generator.
34 . $file.FullName
4- }
5+ }
56
67$aliasNames = @ ()
78foreach ($transpilerCmd in Get-Transpiler ) {
@@ -11,7 +12,9 @@ foreach ($transpilerCmd in Get-Transpiler) {
1112 Set-Alias " .<$ ( $transpilerCmd.DisplayName ) >" Use-PipeScript
1213}
1314
15+ $MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
1416foreach ($cmd in $ExecutionContext.SessionState.InvokeCommand.GetCommands (' *' , ' Function' , $true )) {
17+ if ($cmd.ScriptBlock.Module -ne $MyModule ) { continue }
1518 if ($cmd.ScriptBlock.Attributes.AliasNames ) {
1619 $aliasNames += $cmd.ScriptBlock.Attributes.AliasNames
1720 }
You can’t perform that action at this time.
0 commit comments