Last active
March 13, 2018 12:33
-
-
Save IntelOrca/38cb206afb86a47796bf916a4ed66c3c to your computer and use it in GitHub Desktop.
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 prompt to show just current directory name | |
function global:prompt | |
{ | |
$cwd = [System.IO.Path]::GetFileName((Get-Location)) | |
if ($cwd -eq "") | |
{ | |
$cwd = "\" | |
} | |
Write-Host -NoNewline "PS " | |
Write-Host -NoNewline -ForegroundColor DarkCyan $cwd | |
return " " | |
} | |
# Improve history up/down completion (behave like oh-my-zsh defaults) | |
Set-PSReadLineOption -HistoryNoDuplicates:$true | |
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward | |
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment