mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Add support for pry --gem
I am always doing pry -I./lib -r<gemname>.
This commit is contained in:
parent
36987b5615
commit
3526137cff
1 changed files with 7 additions and 0 deletions
|
@ -161,6 +161,13 @@ Copyright (c) 2013 John Mair (banisterfiend)
|
|||
$LOAD_PATH.unshift(*load_path)
|
||||
end
|
||||
|
||||
on "gem", "Shorthand for -I./lib -rgemname" do |load_path|
|
||||
$LOAD_PATH.unshift("./lib")
|
||||
Dir["./lib/*.rb"].each do |file|
|
||||
Pry.config.requires << file
|
||||
end
|
||||
end
|
||||
|
||||
on :v, :version, "Display the Pry version" do
|
||||
puts "Pry version #{Pry::VERSION} on Ruby #{RUBY_VERSION}"
|
||||
exit
|
||||
|
|
Loading…
Add table
Reference in a new issue