janlelis / irbtools

Improvements for Ruby's IRB console 💎︎
MIT License
920 stars 27 forks source link

custom settings for binding.repl #27

Closed ghost closed 10 years ago

ghost commented 10 years ago

hey could it be a good idea if the default order for binding.repl.auto gave preference to "irb" ? binding.repl defines the default order with pry at the front and since i think irbtools focuses on irb users it might be a good idea to give irb priority.

if you wanted to change the default order you'd say something like:

Binding.repl.auto_order = ["irb", "rib", "pry", "ripl"]

binding.repl has shortcut for auto-discovery as binding.repl! but it's only on master right now. on the released gem it's still binding.repl.auto.

ghost commented 10 years ago

BindingRepl.auto_order = ["irb", …] also works.

ghost commented 10 years ago

released v1.0.0 with binding.repl! to rubygems.org

ghost commented 10 years ago

binding.repl also (once again) has 0 runtime dependencies. adding toml as a runtime dependency was a mistake after thinking about it. fixed in >=v1.0.0.

janlelis commented 10 years ago

Thank you for the updates. Will tweak the order in the next release. Haven't had the issue yet, because I never had pry and irbtools in the same bundle ;)

ghost commented 10 years ago

yeah, the default order is defined as: ["pry", "ripl", "rib", "irb"]. binding.repl! for an IRB user will try to require pry, then ripl, then rib, and finally match on irb, so it's not as efficient as it could be.

ghost commented 10 years ago

:rocket: :rocket: