Last active
December 19, 2021 22:32
-
-
Save xthexder/43f9c4698cc3a4ac0d656eeaa98ca849 to your computer and use it in GitHub Desktop.
PowerShell profile configuration for history search via up/down arrow keys.
This file contains hidden or 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 PSReadLine | |
Import-Module posh-git | |
Set-PSReadLineOption -HistoryNoDuplicates:$True | |
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward | |
# Revert posh-git prompt to default | |
function prompt { | |
'PS ' + $(Get-Location) + $(if ($nestedpromptlevel -ge 1) { '>>' }) + '> ' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment