Created
February 4, 2009 04:55
-
-
Save jugyo/57943 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
`svn diff #{ARGV.join(' ')}`.each do |line| | |
puts( if line =~ /^\+(.*)$/ | |
"\e[32m#{$&}\e[0m" | |
elsif line =~ /^-(.*)$/ | |
"\e[31m#{$&}\e[0m" | |
else | |
line | |
end | |
) | |
end | |
# see also http://www.pjhyett.com/posts/203-colored-svn-diff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment