File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 11foreach ($file in (Get-ChildItem - Path " $psScriptRoot " - Filter " *-*" - Recurse)) {
22 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 .
3+ if ($file.Name -match ' \.[^\.]\. ps1$' ) { continue } # Skip if the file is an unrelated file .
44 . $file.FullName
55}
66
7- $aliasNames = @ ()
8- foreach ($transpilerCmd in Get-Transpiler ) {
9- $aliasNames += " .>$ ( $transpilerCmd.DisplayName ) "
10- Set-Alias " .>$ ( $transpilerCmd.DisplayName ) " Use-PipeScript
11- $aliasNames += " .<$ ( $transpilerCmd.DisplayName ) >"
12- Set-Alias " .<$ ( $transpilerCmd.DisplayName ) >" Use-PipeScript
13- }
7+ $transpilerNames = Get-Transpiler | Select-Object - ExpandProperty DisplayName
8+ $aliasList +=
9+
10+ @ (foreach ($alias in @ ($transpilerNames )) {
11+ Set-Alias " .>$alias " " Use-PipeScript" - PassThru:$True
12+ })
13+
14+
15+ $aliasList +=
16+
17+ @ (foreach ($alias in @ ($transpilerNames )) {
18+ Set-Alias " .<$alias >" " Use-PipeScript" - PassThru:$True
19+ })
20+
1421
1522$MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
16- $aliasNames +=
23+ $aliasList +=
1724
1825 @ (
1926 if ($MyModule -isnot [Management.Automation.PSModuleInfo ]) {
You can’t perform that action at this time.
0 commit comments