Last active
March 4, 2022 16:01
-
-
Save jessegoodier/92ee67ff43d55a2e8e172954f1d55e74 to your computer and use it in GitHub Desktop.
powershell_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-Alias -Name h -Value ALLHISTORY | |
Set-Alias -Name history -Value ALLHISTORY | |
Set-Alias -name which where.exe | |
Set-Alias -name curl -value http.exe # pip install httpie or choco install httpie | |
Set-Alias -Name ll -Value Get-ChildItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module posh-git | |
Import-Module oh-my-posh | |
Import-Module Terminal-Icons | |
Set-PoshPrompt -Theme $HOME\OneDrive\Documents\PowerShell\blueish.omp.json | |
$env:POSH_GIT_ENABLED = $true | |
# show command history while typing | |
# https://www.hanselman.com/blog/you-should-be-customizing-your-powershell-prompt-with-psreadline | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
Set-PSReadLineOption -PredictionSource History | |
Function ALLHISTORY {Get-Content (Get-PSReadlineOption).HistorySavePath} | |
kubectl completion powershell | Out-String | Invoke-Expression | |
helm completion powershell |Out-String | Invoke-Expression | |
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete #this is optional | |
Set-PSReadlineOption -BellStyle Visual #optional | |
# Chocolatey completion: | |
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
if (Test-Path($ChocolateyProfile)) { | |
Import-Module "$ChocolateyProfile" | |
} | |
. $HOME\OneDrive\Documents\PowerShell\aliases.ps1 | |
#. $HOME\OneDrive\Documents\PowerShell\kube-completion.ps1 # v1.23 generate with: kubectl.exe completion powershell | Out-String | Invoke-Expression>$HOME\OneDrive\Documents\PowerShell\kube-completion.ps1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment