[ruby] Make enter re-run the last command in Pry

pull/28/head
Alpha Chen 10 years ago
parent 456cc2f968
commit af17852eb8

@ -22,5 +22,9 @@ end
def tic; @_tic = Time.now; end def tic; @_tic = Time.now; end
def toc; Time.now - @_tic; end def toc; Time.now - @_tic; end
Pry::Commands.command /^$/, "repeat last command" do
_pry_.input = StringIO.new(Pry.history.to_a.last)
end
pryrc_local = File.expand_path('../.pryrc.local', __FILE__) pryrc_local = File.expand_path('../.pryrc.local', __FILE__)
load pryrc_local if File.exists?(pryrc_local) load pryrc_local if File.exists?(pryrc_local)

Loading…
Cancel
Save