Skip to content

Instantly share code, notes, and snippets.

@mdub
Last active December 16, 2015 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdub/5476778 to your computer and use it in GitHub Desktop.
Save mdub/5476778 to your computer and use it in GitHub Desktop.
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