String.f convenience function for brew irb
eg. "ack".f
This commit is contained in:
parent
20fdc5cd2f
commit
e7c05f558b
@ -1,13 +1,21 @@
|
||||
require 'formula'
|
||||
require 'keg'
|
||||
require 'irb'
|
||||
|
||||
class String
|
||||
def f
|
||||
Formula.factory(self)
|
||||
end
|
||||
end
|
||||
|
||||
module Homebrew extend self
|
||||
def irb
|
||||
if ARGV.include? "--help"
|
||||
puts "Formula.factory('ace').installed?"
|
||||
puts "ack.f # => instance of the Ack formula"
|
||||
else
|
||||
ohai "Interactive Homebrew Shell"
|
||||
puts "Example commands available with: brew irb --help"
|
||||
require 'formula'
|
||||
require 'keg'
|
||||
require 'irb'
|
||||
IRB.start
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user