Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Autotest feedback in the terminal title-bar
# Pop this in your ~/.autotest
def set_title(title)
if ENV["TERM"] =~ /^xterm/
puts "\e]0;#{title}\007"
end
end
Autotest.add_hook(:green) do
set_title "GREEN - all passed"
end
Autotest.add_hook(:red) do |autotest|
set_title "RED - #{autotest.files_to_test.size} failure"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment