-
Notifications
You must be signed in to change notification settings - Fork 4
/
options.ps1
20 lines (18 loc) · 991 Bytes
/
options.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Trust PSGallery
$galleryinfo = Get-PSRepository | Where-Object { $_.Name -eq "PSGallery" }
if (-not($galleryinfo.InstallationPolicy.Equals("Trusted"))) { Set-PSRepository -Name PSGallery -InstallationPolicy Trusted }
# Default Parameters
$PSDefaultParameterValues = @{
"Update-Module:Confirm" = $False;
"Update-Module:Force" = $True;
"Update-Module:Scope" = "CurrentUser";
"Update-Module:ErrorAction" = "SilentlyContinue";
"Update-Help:Force" = $True;
"Update-Help:ErrorAction" = "SilentlyContinue";
}
# Set PSReadLineOptions's (Beta Version Required):
Set-PSReadLineOption -PredictionSource History -WarningAction SilentlyContinue -ErrorAction SilentlyContinue
Set-PSReadLineOption -PredictionViewStyle ListView -WarningAction SilentlyContinue -ErrorAction SilentlyContinue
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -EditMode Windows