Shuffled some stuff out of main homesick.rb

This commit is contained in:
Joshua Nichols
2010-03-18 23:28:25 -04:00
parent ce0d9b9d02
commit bf66d91b1f
3 changed files with 61 additions and 53 deletions

17
lib/homesick/shell.rb Normal file
View File

@@ -0,0 +1,17 @@
class Homesick
# Hack in support for diffing symlinks
class Shell < Thor::Shell::Color
def show_diff(destination, content)
destination = Pathname.new(destination)
if destination.symlink?
say "- #{destination.readlink}", :red, true
say "+ #{content.expand_path}", :green, true
else
super
end
end
end
end