2022-09-11 17:22:45 +02:00
|
|
|
using namespace System.Management.Automation
|
2022-02-26 10:33:50 +01:00
|
|
|
|
2021-12-05 16:12:47 +01:00
|
|
|
Import-Module PSReadLine
|
|
|
|
|
2022-09-17 09:43:53 +02:00
|
|
|
# Setting up PATH
|
|
|
|
$env:Path = "$HOME/Bin/system/;" + "$env:Path"
|
|
|
|
|
2021-12-05 16:12:47 +01:00
|
|
|
$versionMinimum = [Version]'7.1.999'
|
|
|
|
|
|
|
|
if (($Host.Name -eq 'ConsoleHost') -and ($PSVersionTable.PSVersion -ge $versionMinimum))
|
|
|
|
{
|
|
|
|
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Set-PSReadLineOption -PredictionSource History
|
|
|
|
}
|
|
|
|
|
|
|
|
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
|
|
|
|
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
|
|
|
|
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
|
|
|
|
Set-PSReadLineOption -PredictionViewStyle ListView
|
|
|
|
Set-PSReadlineOption -Color @{
|
|
|
|
"Command" = [ConsoleColor]::Green
|
|
|
|
"Parameter" = [ConsoleColor]::Gray
|
|
|
|
"Operator" = [ConsoleColor]::Magenta
|
|
|
|
"Variable" = [ConsoleColor]::White
|
|
|
|
"String" = [ConsoleColor]::Yellow
|
|
|
|
"Number" = [ConsoleColor]::Blue
|
|
|
|
"Type" = [ConsoleColor]::Cyan
|
|
|
|
"Comment" = [ConsoleColor]::DarkCyan
|
|
|
|
}
|
|
|
|
|
|
|
|
# Chocolatey profile
|
|
|
|
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
|
|
|
if (Test-Path($ChocolateyProfile)) {
|
|
|
|
Import-Module "$ChocolateyProfile"
|
|
|
|
}
|
|
|
|
|
2022-09-17 09:43:53 +02:00
|
|
|
function dl {
|
2022-02-26 10:33:50 +01:00
|
|
|
Set-Location ~\Downloads
|
2021-12-05 16:12:47 +01:00
|
|
|
aria2c -j 16 -s 16 -x 16 -k 5M --file-allocation=none $args[0]
|
|
|
|
}
|
|
|
|
|
2022-09-17 09:43:53 +02:00
|
|
|
New-Alias vi nvim-qt.exe
|
|
|
|
|
|
|
|
Invoke-Expression (&starship init powershell)
|