diff options
| author | Mike McQuaid | 2018-02-28 11:36:23 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2018-02-28 11:36:23 +0000 |
| commit | 2205f62ec672643b845579f8687b0372b256f485 (patch) | |
| tree | 7cb071d7138feb1811fe2f700dba581c654cb554 /Library/Homebrew/cmd | |
| parent | 6302da37f66fe9bb04e95fe67e8529fe0086187d (diff) | |
| download | brew-2205f62ec672643b845579f8687b0372b256f485.tar.bz2 | |
irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/irb.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Library/Homebrew/cmd/irb.rb b/Library/Homebrew/cmd/irb.rb deleted file mode 100644 index 4cd3d4c9e..000000000 --- a/Library/Homebrew/cmd/irb.rb +++ /dev/null @@ -1,40 +0,0 @@ -#: * `irb` [`--examples`]: -#: Enter the interactive Homebrew Ruby shell. -#: -#: If `--examples` is passed, several examples will be shown. - -require "formula" -require "keg" -require "irb" - -class Symbol - def f(*args) - Formulary.factory(to_s, *args) - end -end - -class String - def f(*args) - Formulary.factory(self, *args) - end -end - -module Homebrew - module_function - - def irb - $LOAD_PATH.unshift("#{HOMEBREW_LIBRARY_PATH}/cask/lib") - require "hbc" - - if ARGV.include? "--examples" - puts "'v8'.f # => instance of the v8 formula" - 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 --examples" - IRB.start - end - end -end |
