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 1
1
foreach ($file in (Get-ChildItem - Path " $psScriptRoot " - Filter " *-*" - Recurse)) {
2
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 .
3
+ if ($file.Name -match ' \.[^\.]\. ps1$' ) { continue } # Skip if the file is an unrelated file .
4
4
. $file.FullName
5
5
}
6
6
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
+
14
21
15
22
$MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
16
- $aliasNames +=
23
+ $aliasList +=
17
24
18
25
@ (
19
26
if ($MyModule -isnot [Management.Automation.PSModuleInfo ]) {
You can’t perform that action at this time.
0 commit comments