Skip to content

Instantly share code, notes, and snippets.

@IntelOrca
Last active March 13, 2018 12:33
Show Gist options
  • Save IntelOrca/38cb206afb86a47796bf916a4ed66c3c to your computer and use it in GitHub Desktop.
Save IntelOrca/38cb206afb86a47796bf916a4ed66c3c to your computer and use it in GitHub Desktop.
# 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