# File lib/less/command.rb, line 28 def run! if watch? parse(true) unless File.exist? @destination log "Watching for changes in #@source... Ctrl-C to abort.\n: " # Main watch loop loop do watch { sleep 1 } # File has changed if File.stat( @source ).mtime > File.stat( @destination ).mtime print Time.now.strftime("%H:%M:%S -- ") if @options[:timestamps] print "Change detected... " # Loop until error is fixed until parse log "Press [return] to continue..." watch { $stdin.gets } end end end else parse end end