From c41e18191b82e89aeeffc1236fb100816066f654 Mon Sep 17 00:00:00 2001 From: John Mair Date: Thu, 14 Apr 2011 21:42:43 +1200 Subject: [PATCH] added 'hist' command --- lib/pry/commands.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pry/commands.rb b/lib/pry/commands.rb index a4935727..b1e21f33 100644 --- a/lib/pry/commands.rb +++ b/lib/pry/commands.rb @@ -23,9 +23,15 @@ class Pry Pry.start(target) end + # this cannot be accessed, it's just for help purposed. command ".", "All text following a '.' is forwarded to the shell." do end + command "hist", "Show Readline history" do + text = add_line_numbers(Readline::HISTORY.to_a.join("\n"), 0) + stagger_output(text) + end + command "exit-program", "End the current program. Aliases: quit-program, !!!" do exit end