Files
gosick/lib/homesick/shell.rb
2014-01-15 23:23:29 -05:00

16 lines
366 B
Ruby

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