Created
January 31, 2017 00:03
-
-
Save elacy/e5c44796d01b621442898bc2a2fafd48 to your computer and use it in GitHub Desktop.
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
$HistoryFilePath = Join-Path ([Environment]::GetFolderPath('UserProfile')) .ps_history | |
Register-EngineEvent PowerShell.Exiting -Action { Get-History | Export-Clixml $HistoryFilePath } | out-null | |
if (Test-path $HistoryFilePath) { Import-Clixml $HistoryFilePath | Add-History } | |
# if you don't already have this configured... | |
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward | |
# Load posh-git example profile | |
. 'C:\code\posh-git\profile.example.ps1' | |
cd c:\code | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment