4
4
# Current User, Current Host Powershell Core v7 $PROFILE:
5
5
# -------------------------------------------------------
6
6
7
- # Trust PSGallery
8
- $galleryinfo = Get-PSRepository | Where-Object { $_.Name -eq " PSGallery" }
9
- if (-not ($galleryinfo.InstallationPolicy.Equals (" Trusted" ))) { Set-PSRepository - Name PSGallery - InstallationPolicy Trusted }
10
-
11
- # Default Parameters
12
- $PSDefaultParameterValues = @ {
13
- " Update-Module:Confirm" = $False ;
14
- " Update-Module:Force" = $True ;
15
- " Update-Module:Scope" = " CurrentUser" ;
16
- " Update-Module:ErrorAction" = " SilentlyContinue" ;
17
- " Update-Help:Force" = $True ;
18
- " Update-Help:ErrorAction" = " SilentlyContinue"
19
- }
20
-
21
- $psdir = (Split-Path - Parent $profile )
22
-
23
- # Load Functions, Aliases, Completions, and Modules
24
- If (Test-Path " $psdir \Profile\functions.ps1" ) { . " $psdir \Profile\functions.ps1" }
25
- If (Test-Path " $psdir \Profile\aliases.ps1" ) { . " $psdir \Profile\aliases.ps1" }
26
- If (Test-Path " $psdir \Profile\completion.ps1" ) { . " $psdir \Profile\completion.ps1" }
27
- If (Test-Path " $psdir \Profile\modules.ps1" ) { . " $psdir \Profile\modules.ps1" }
28
-
29
- # Set PSReadLineOptions's (Beta Version Required):
30
- If (! (! ((Get-Module - Name PSReadLine).Version.Major -ge 2 )) -and (! (Get-Module - Name PSReadLine).Version.Minor -ge 2 )) {
31
- Install-Module - Name PSReadLine - AllowPrerelease - Force - AllowClobber - Scope CurrentUser
32
- }
33
- Set-PSReadLineOption - PredictionSource History - WarningAction SilentlyContinue - ErrorAction SilentlyContinue
34
- Set-PSReadLineOption - PredictionViewStyle ListView - WarningAction SilentlyContinue - ErrorAction SilentlyContinue
35
- Set-PSReadLineKeyHandler - Key UpArrow - Function HistorySearchBackward
36
- Set-PSReadLineKeyHandler - Key DownArrow - Function HistorySearchForward
37
- Set-PSReadlineOption - EditMode Windows
7
+ # Load Custom User Specific Functions Here:
8
+ # . Custom\*.ps1
0 commit comments