-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerShellWSL.psm1
More file actions
18 lines (13 loc) · 916 Bytes
/
Copy pathPowerShellWSL.psm1
File metadata and controls
18 lines (13 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# import enums
Get-ChildItem "$PSScriptRoot\Enums" -Filter *.ps1 | ForEach-Object { . $_.FullName }
# import classes
Get-ChildItem "$PSScriptRoot\Classes" -Filter *.ps1 | ForEach-Object { . $_.FullName }
# import public functions
Get-ChildItem "$PSScriptRoot\Public" -Filter *.ps1 | ForEach-Object { . $_.FullName }
# import private functions
Get-ChildItem "$PSScriptRoot\Private" -Filter *.ps1 | ForEach-Object { . $_.FullName }
# aliases setup
Set-Alias -Name 'Start-Wsl' -Value 'Start-WslDistribution' -Description "Alias for Start-WslDistribution. Starts a specified WSL distribution."
Set-Alias -Name 'Invoke-Wsl' -Value 'Invoke-WslCommand' -Description "Alias for Invoke-WslCommand. Invokes a command in a specified WSL distribution."
Export-ModuleMember -Function (Get-ChildItem "$PSScriptRoot\Public\*.ps1" -Recurse | ForEach-Object { $_.BaseName })`
-Alias 'Start-Wsl','Invoke-Wsl'