Created
February 18, 2016 18:27
-
-
Save thefrench77/5b0d7f76ab760c43d6a1 to your computer and use it in GitHub Desktop.
PowerShell profile
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
| $env:Path = ".;$env:Path" | |
| # Window title: | |
| $host.ui.RawUI.WindowTitle=[Environment]::UserDomainName + "\" + [Environment]::UserName + "@" + [Environment]::MachineName | |
| # Persistent history: | |
| $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 } | |
| Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
| Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment