More brew irb examples
This commit is contained in:
parent
04173d55c2
commit
113ed85e8d
@ -2,6 +2,11 @@ require 'formula'
|
|||||||
require 'keg'
|
require 'keg'
|
||||||
require 'irb'
|
require 'irb'
|
||||||
|
|
||||||
|
class Symbol
|
||||||
|
def f
|
||||||
|
Formula.factory(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
class String
|
class String
|
||||||
def f
|
def f
|
||||||
Formula.factory(self)
|
Formula.factory(self)
|
||||||
@ -11,8 +16,10 @@ end
|
|||||||
module Homebrew extend self
|
module Homebrew extend self
|
||||||
def irb
|
def irb
|
||||||
if ARGV.include? "--help"
|
if ARGV.include? "--help"
|
||||||
puts "Formula.factory('ace').installed?"
|
puts "'v8'.f # => instance of the Ack formula"
|
||||||
puts "ack.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? }"
|
||||||
else
|
else
|
||||||
ohai "Interactive Homebrew Shell"
|
ohai "Interactive Homebrew Shell"
|
||||||
puts "Example commands available with: brew irb --help"
|
puts "Example commands available with: brew irb --help"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user