Shuffled some stuff out of main homesick.rb
This commit is contained in:
17
lib/homesick/shell.rb
Normal file
17
lib/homesick/shell.rb
Normal 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
|
||||
Reference in New Issue
Block a user