30 lines
554 B
Ruby
Raw Normal View History

require 'formula'
require 'keg'
require 'irb'
2012-08-31 08:09:50 -04:00
class Symbol
def f
Formulary.factory(to_s)
2012-08-31 08:09:50 -04:00
end
end
class String
def f
Formulary.factory(self)
end
end
module Homebrew
def irb
if ARGV.include? "--help"
2014-06-19 19:13:45 -05:00
puts "'v8'.f # => instance of the v8 formula"
2012-08-31 08:09:50 -04:00
puts ":hub.f.installed?"
puts ":lua.f.methods - 1.methods"
puts ":mpd.f.recursive_dependencies.reject(&:installed?)"
else
ohai "Interactive Homebrew Shell"
puts "Example commands available with: brew irb --help"
IRB.start
end
end
end