aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMax Howell2012-08-30 22:54:24 -0400
committerMax Howell2012-08-30 22:54:45 -0400
commite7c05f558ba2fc8c77740b09fb3ba305a87477e6 (patch)
treea011ce924e1c97be68e93e66416a8dabaca157cb /Library/Homebrew/cmd
parent20fdc5cd2facfd1172ac487d947806dbb0007313 (diff)
downloadbrew-e7c05f558ba2fc8c77740b09fb3ba305a87477e6.tar.bz2
String.f convenience function for brew irb
eg. "ack".f
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/irb.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/irb.rb b/Library/Homebrew/cmd/irb.rb
index 845747c25..c43fa9f07 100644
--- a/Library/Homebrew/cmd/irb.rb
+++ b/Library/Homebrew/cmd/irb.rb
@@ -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