Created
December 26, 2023 17:26
-
-
Save justanindieguy/ceef944c8c2f47eebf85024a40ba5347 to your computer and use it in GitHub Desktop.
Powershell config
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
# Load prompt config | |
function Get-ScriptDirectory { Split-Path $MyInvocation.ScriptName } | |
# Icons | |
Import-Module -Name Terminal-Icons | |
# PSReadLine | |
Set-PSReadLineOption -EditMode Emacs | |
Set-PSReadLineOption -BellStyle None | |
Set-PSReadLineOption -PredictionSource History | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar | |
# Fzf | |
Import-Module PSFzf | |
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r' | |
# Alias | |
Set-Alias vim nvim | |
Set-Alias l ls | |
Set-Alias g git | |
Set-Alias grep findstr | |
Set-Alias tig 'C:\Program Files\Git\usr\bin\tig.exe' | |
Set-Alias less 'C:\Program Files\Git\usr\bin\less.exe' | |
# Oh My Posh! | |
oh-my-posh init pwsh --config 'C:\Users\Emmanuel\.mintimb.omp.json' | Invoke-Expression | |
# Utilities | |
function which ($command) { | |
Get-Command -Name $command -ErrorAction SilentlyContinue | | |
Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment