Last active
June 27, 2023 13:12
-
-
Save anantgupta129/b94df4f17a9d4fc937f0c583da0d220f to your computer and use it in GitHub Desktop.
Power shell startup 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-PSReadLineKeyHandler -Chord 'Ctrl+d' -ScriptBlock { [System.Environment]::Exit(0) } | |
Import-Module -Name Terminal-Icons | |
Import-Module PSFzf | |
# replace 'Ctrl+t' and 'Ctrl+r' with your preferred bindings: | |
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' | |
Set-Alias vim nvim | |
function prompt { | |
$p = Convert-Path . | |
$arr = $p.Split("\") | |
if($arr.Count -cle 3){ | |
$p = $p | |
}else { | |
$p = $arr[-3..-1]-join"\" | |
} | |
"`n($env:CONDA_DEFAULT_ENV) PS $p >`n→ " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment