bin/sync_dir in utils-0.39.0 vs bin/sync_dir in utils-0.40.0
- old
+ new
@@ -21,11 +21,11 @@
`diff -rq #{$src.inspect} #{$dst.inspect}`
end
def ask?(prompt:)
print prompt
- answer = gets.chomp
+ gets.chomp
end
$src = ARGV.shift or fail "need source directory as first argument"
$src = local_path $src
$dst = ARGV.shift || ?.
@@ -72,9 +72,10 @@
(V)imdiff
(S)kip
end
ask?(prompt: 'action? ') =~ /\Av/i or next
system "vimdiff #{s.inspect} #{d.inspect}"
+ redo
end
rescue Interrupt
exit
end