commit 8b6d66b49a51e759ef4825b68d4a3740919038ba
parent da6a682e67731a4f76095bfd36b245e7b8f11374
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Tue, 18 Aug 2009 14:33:04 -0400
add intro help text and 'e' command to console mode
'e' restarts evaluation once you've stopped it with ctrl-g.
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git 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 << <<EOS
+Sup #{VERSION} console.
+Available commands: #{(@console.methods - Object.methods) * ", "}
+Ctrl-g stops evaluation; 'e' restarts it.
+
+EOS
end
def execute cmd