Came across this post Displaying GIT Branch on your PowerShell prompt and built it for subversion. Add this to your $PROFILE.
function prompt {
$host.ui.rawui.WindowTitle = $(get-location)
if(Test-Path .svn) {
switch -regex (svn st) {
"^\?" {$other+=1}
"^A" {$added+=1}
"^M" {$modified+=1}
default {}
}
$prompt_string = "SVN o:$other a:$added m:$modified >"
} else {
$prompt_string = "PS >"
}
Write-Host ($prompt_string) -nonewline -foregroundcolor yellow
return " "
}
For a directory that is an svn working copy.
- o:4 – 4 files not under version control
- a:1 – 1 item scheduled for addition
- m:1 – 1 item has been modified
Issuing svn add or check in commands causes the prompt to be refreshed.





{ 3 trackbacks }
{ 4 comments… read them below or add one }
Good one, Doug! I’m going to cover this and the Git one on an upcoming podcast (powerscripting.net).
Great stuff,
but did you see GIT has PowerTab support now…
.. looks like that would be cool for SVN also
Greetings /\/\o\/\/
Is there anything that PowerTab doesn’t support?
I knew you would be in there.
Excellent.
Great idea. Enhanced it by defaulting the counters to 0 (as I only have very few files – just started with SVN)