From 8b6d66b49a51e759ef4825b68d4a3740919038ba Mon Sep 17 00:00:00 2001 From: William Morgan Date: Tue, 18 Aug 2009 14:33:04 -0400 Subject: [PATCH] add intro help text and 'e' command to console mode 'e' restarts evaluation once you've stopped it with ctrl-g. --- lib/sup/modes/console-mode.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/sup/modes/console-mode.rb b/lib/sup/modes/console-mode.rb index 372a466..e2a69d9 100644 --- a/lib/sup/modes/console-mode.rb +++ b/lib/sup/modes/console-mode.rb @@ -59,9 +59,20 @@ class Console end class ConsoleMode < LogMode + register_keymap do |k| + k.add :run, "Restart evaluation", 'e' + end + def initialize super - @binding = Console.new(self).instance_eval { binding } + @console = Console.new self + @binding = @console.instance_eval { binding } + self << <