?

Log in

Mostly a note to self, this is how you can show your current git… - Testing 1,2,3... [entries|archive|friends|userinfo]
djberg96

[ website | Netrunner Tracker ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| Ruby Home RubyForge RAA comp.lang.ruby Ruby Documentation ]

[Jun. 24th, 2016|07:08 am]
djberg96
[Tags|]

Mostly a note to self, this is how you can show your current git branch in Windows Powershell. Just add it to your profile.ps1.

function prompt{
  $p = (Get-Location).path

  git branch | foreach{
    if($_ -match "^\*(.*)"){
     $match = $matches[1] -replace '\s', ''
     $p += " [" + $match + "]"
    }
  }

  $p = $p + ">"
  Write-Host $p -NoNewline
  return " "
}
linkReply