#!/usr/bin/env ruby
require "rubygems"
require "thor"
require 'terminal-notifier'
class NotifyAfter < Thor
desc "after ARGS",
"ARGS is the after and list of arguments to run, after which you will be notified."
method_option :verbose,
:type => :boolean,
:default => false,
:required => false,
:aliases => "-v"
def after(*args)
# puts ">>> args: [#{args.join(' ')}]"
binary = args.shift
cmdline = "#{binary} #{args.join(' ')}"
output = `#{cmdline}`
puts(output)
TerminalNotifier.notify("Finished", :title => "#{binary} command")
end
end
NotifyAfter.start