Files
gosick/lib/homesick/shell.rb
2014-04-16 17:29:17 -04:00

18 lines
383 B
Ruby

require 'thor'
module 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