Skip to content

Instantly share code, notes, and snippets.

@uncas
uncas / profile.ps1
Created February 28, 2012 09:28 — forked from markembling/profile.ps1
My preferred prompt for Powershell - includes git info.
# My preferred prompt for Powershell.
# Displays git branch (and stats) when inside a git repository.
# See http://gist.github.com/180853 for gitutils.ps1.
. (Resolve-Path D:/Users/ole/Documents/WindowsPowershell/gitutils.ps1)
function prompt {
$userLocation = $env:username + ' ' + $pwd
$host.UI.RawUi.WindowTitle = $userLocation
Write-Host($pwd) -nonewline -foregroundcolor Green
@uncas
uncas / gitutils.ps1
Created February 28, 2012 09:28 — forked from markembling/gitutils.ps1
Powershell functions for git information
# Git functions
# Mark Embling (http://www.markembling.info/)
# Is the current directory a git repository/working copy?
function isCurrentDirectoryGitRepository {
if ((Test-Path ".git") -eq $TRUE) {
return $TRUE
}
# Test within parent dirs