Skip to content

Instantly share code, notes, and snippets.

@jlao
Created August 29, 2012 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlao/3507824 to your computer and use it in GitHub Desktop.
Save jlao/3507824 to your computer and use it in GitHub Desktop.
My PowerShell profile customizations
function prompt
{
$loc = Get-Location
$parts = $loc.Path.split("\")
$shortparts = @($parts[0])
if ($parts.length -gt 2)
{
$shortparts += $parts[1..($parts.length - 2)] | % { $_[0] }
}
$shortparts += $parts[-1]
$locstr = [string]::join("\", $shortparts)
$locstr + "> "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment