2022-08-16 06:43:25 +00:00
|
|
|
# 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
|
|
|
|
|
2023-04-06 08:28:09 +00:00
|
|
|
# kube / helm
|
2022-08-16 06:43:25 +00:00
|
|
|
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
|
|
|
|
}
|