34 lines
969 B
PowerShell
34 lines
969 B
PowerShell
|
# Import module:
|
||
|
$profile_folder = (Split-Path -Parent $PROFILE)
|
||
|
|
||
|
Import-Module posh-git
|
||
|
|
||
|
$env:POSH_GIT_ENABLED = $true
|
||
|
$env:VIRTUAL_ENV_DISABLE_PROMPT = "True"
|
||
|
|
||
|
oh-my-posh init pwsh --config (Join-Path $profile_folder theme.omp.json) | Invoke-Expression
|
||
|
|
||
|
function docker {
|
||
|
wsl -- docker $args
|
||
|
}
|
||
|
|
||
|
Import-Module posh-ssh
|
||
|
Import-Module posh-venv
|
||
|
Import-Module DockerCompletion
|
||
|
|
||
|
Set-PSReadLineOption -PredictionSource History
|
||
|
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
|
||
|
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
|
||
|
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
|
||
|
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
|
||
|
Set-PSReadlineOption -BellStyle None
|
||
|
|
||
|
# kube
|
||
|
if (Get-Command kubectl -ErrorAction SilentlyContinue) {
|
||
|
kubectl completion powershell | Out-String | Invoke-Expression
|
||
|
}
|
||
|
|
||
|
if (Get-Command helm -ErrorAction SilentlyContinue) {
|
||
|
helm completion powershell | Out-String | Invoke-Expression
|
||
|
}
|