candland

@candland rss self
August 25th 2009

Setting the Powershell Console's Title to the Current SVN URL

I'm testing out branching per feature, as such I wanted a way to know where my working directory was pointing. Since I'm using power shell I added some functions to my profile script to set the window title to the svn url. This doesn't auto update w/ an svn switch, but set-svntitle can be called manually.

Anyway, here’s the script.

$projects = "C:\data\working"

function set-title{Param([string] $title); $Host.Ui.RawUi.WindowTitle = $title}

function set-svntitle {

$currentsvn = svn info $projects | select-string "URL: "
set-title $currentsvn 

}

set-svntitle

blog comments powered by Disqus