25. $HOME/.autotest
require 'socket'
require 'autotest/tmux'
Autotest.add_hook :ran_command do |at, *args|
next false unless Autotest::Tmux.execute?
output = at.results.join
result = Autotest::Tmux.parse_output(output, at.class.name)
TCPSocket.open('localhost', 12345) do |s|
prefix = case result[:color]
when :red; 'R:'
when :yellow; 'Y:'
when :green; 'G:'
else ''
end
s.write "#{prefix}#{output}"
end
next false
end
http://saikyoline.jp/air/swn/