Colorize Subversion SVN (modification of post by jim palmer view diff)
diff | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/688"></script>download | new post
Colorize Subversion SVN STAT output.
Here’s a PowerShell function that you can use to make those numerous SVN STAT commands you run every day via the PowerShell CLI a little easier to read by adding colors.
- ## SVN STAT colorizer - http://www.overset.com/2008/11/18/colorized-subversion-svn-stat-powershell-function/
- function ss () {
- $c = @{ "A"="Magenta"; "D"="Red"; "C"="Yellow"; "G"="Blue"; "M"="Cyan"; "U"="Green"; "?"="DarkGray"; "!"="DarkRed" }
- foreach ( $svno in svn stat ) {
- if ( $c.ContainsKey($svno.ToString().SubString(0,1).ToUpper()) ) {
- write-host $svno -Fore $c.Get_Item($svno.ToString().SubString(0,1).ToUpper()).ToString()
- } else {
- write-host $svno
- }
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository