Skip to content

Use Pry for sequel command if it's been loaded #459

Closed
wants to merge 1 commit into from

2 participants

@misfo
misfo commented Mar 27, 2012

This allows the user to use the popular IRB alternative by firing up sequel with sequel -rpry ....

@misfo misfo Use Pry for sequel command if it's been loaded
This allows the user to use the popular IRB alternative by firing up sequel
with `sequel -rpry ...`.
c0aa21a
@jeremyevans
Owner

I don't think that bin/sequel should attempt to check for the existence of irb alternatives. I'm still open to this change, but you'll have to post on the sequel-talk Google Group and get community support behind your proposal. If the community is in favor of this change, I'll reopen this pull request and merge it.

Note that if you add a pry_start.rb file somewhere that just does require 'pry'; Pry.start, you can get what you want via:

bin/sequel sqlite:/ /path/to/pry_start.rb

It's fairly easy to add a wrapper script/shell function that encapsulates that so that pry will be used instead of irb.

@misfo
misfo commented Mar 27, 2012

Fair enough. There are probably a number of different ways people probably want to customize their console, so it makes sense not to open that can of worms.

In my case, your suggestion would probably work better anyways:

Note that if you add a pry_start.rb file somewhere that just does require 'pry'; Pry.start, you can get what you want via:

bin/sequel sqlite:/ /path/to/pry_start.rb

@jeremyevans
Owner

Just in case someone comes back to this, replacing IRB with Pry in bin/sequel can now be done more easily: bin/sequel -r pry sqlite:/ -c Pry.start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.