2012-08-30 22:54:24 -04:00
|
|
|
require 'formula'
|
|
|
|
require 'keg'
|
|
|
|
require 'irb'
|
|
|
|
|
2012-08-31 08:09:50 -04:00
|
|
|
class Symbol
|
|
|
|
def f
|
|
|
|
Formula.factory(self)
|
|
|
|
end
|
|
|
|
end
|
2012-08-30 22:54:24 -04:00
|
|
|
class String
|
|
|
|
def f
|
|
|
|
Formula.factory(self)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-08-06 14:41:55 -04:00
|
|
|
module Homebrew extend self
|
|
|
|
def irb
|
|
|
|
if ARGV.include? "--help"
|
2012-08-31 08:09:50 -04:00
|
|
|
puts "'v8'.f # => instance of the Ack formula"
|
|
|
|
puts ":hub.f.installed?"
|
|
|
|
puts ":lua.f.methods - 1.methods"
|
|
|
|
puts ":mpd.f.recursive_deps.reject{|f| f.installed? }"
|
2012-08-06 14:41:55 -04:00
|
|
|
else
|
|
|
|
ohai "Interactive Homebrew Shell"
|
|
|
|
puts "Example commands available with: brew irb --help"
|
2012-08-21 09:51:28 -04:00
|
|
|
IRB.start
|
2012-08-06 14:41:55 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|