Created
June 16, 2014 14:02
-
-
Save schlarpc/02cf9a2543f7f1df596b to your computer and use it in GitHub Desktop.
PowerShell prompt
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
(Get-Host).UI.RawUI.WindowTitle = "Windows PowerShell" | |
function Get-DirAlias ([string]$loc) { | |
return $loc.Replace($env:homedrive + $env:homepath, "~") | |
} | |
function prompt { | |
Write-Host "$env:username@$env:computername" -NoNewLine -ForegroundColor Green | |
Write-Host ":" -NoNewLine | |
Write-Host "$(Get-DirAlias($(Get-Location)))" -NoNewLine -ForegroundColor Cyan | |
return "$ " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment