-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMicrosoft.PowerShell_profile.ps1
34 lines (27 loc) · 1.07 KB
/
Microsoft.PowerShell_profile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Auto-load commands:
$CommandsPath = "$PSScriptRoot\Core\Commands"
foreach ($FolderPath in Get-ChildItem -Path $CommandsPath -Directory) {
$FolderName = Split-Path -Path $FolderPath -Leaf
if (!(Test-Path -Path "$FolderPath\$FolderName.Cmd.ps1" -PathType Leaf)) { return }
. "$FolderPath\$FolderName.Cmd.ps1"
}
foreach ($FilePath in Get-ChildItem -Path "$PSScriptRoot\Core\Functions" -File) {
. $FilePath
}
# Auto-load configs:
foreach ($FilePath in Get-ChildItem -Path "$PSScriptRoot\Core\Configs" -File) {
. $FilePath
}
# Auto-load extensions:
foreach ($FilePath in Get-ChildItem -Path "$PSScriptRoot\Core\Extensions" -File) {
. $FilePath
}
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}