Skip to content

Instantly share code, notes, and snippets.

@joelquintyn
Last active February 27, 2025 00:52
Show Gist options
  • Save joelquintyn/faf196095c7058867d17319fbcc5f645 to your computer and use it in GitHub Desktop.
Save joelquintyn/faf196095c7058867d17319fbcc5f645 to your computer and use it in GitHub Desktop.
My Windows PowerShell profile configs.
if ($host.Name -eq 'ConsoleHost') {
Import-Module PSReadLine
}
Import-Module -Name Terminal-Icons
Import-Module -Name CompletionPredictor
#Aliases
Set-Alias ll ls
Set-Alias g git
# Set-Alias grep finstr
# Set-Alias tig 'C:Program Files\Git\usr\bin\tig.exe'
# Set-Alias less 'C:\Program Files\Git\usr\bin\less.exe'
# PSReadLine Options
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle InlineView
Set-PSReadLineOption -EditMode Windows
#---------------------------------------------------------------------
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineKeyHandler -Key RightArrow -Function AcceptSuggestion
Set-PSReadLineKeyHandler -Key "Shift+Tab" -Function ForwardWord
# Set-PSReadLineKeyHandler -Chord "Tab" -Function ForwardWord
# !Always keep these at the bottom of the file!
# Initialize oh-my-posh prompt.
oh-my-posh init pwsh | Invoke-Expression
# Initialize zoxide.
Invoke-Expression (& { (zoxide init powershell | Out-String) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment