summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b119447)
Now that it's a regular buffer, it must act like one. I've moved
the message to #run, where it kinda makes more sense. Also tweaked
a few things.
def xapian; Index.instance.instance_variable_get :@xapian; end
def ferret; Index.instance.instance_variable_get :@index; end
def xapian; Index.instance.instance_variable_get :@xapian; end
def ferret; Index.instance.instance_variable_get :@index; end
+ def special_methods; methods - Object.methods end
## files that won't cause problems when reloaded
## TODO expand this list / convert to blacklist
## files that won't cause problems when reloaded
## TODO expand this list / convert to blacklist
super
@console = Console.new self
@binding = @console.instance_eval { binding }
super
@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
- BufferManager.ask :console, "eval: "
+ BufferManager.ask :console, ">> "
+ self << <<EOS
+Sup v#{VERSION} console session started.
+Available extra commands: #{(@console.special_methods) * ", "}
+Ctrl-G stops evaluation; 'e' restarts it.
+
+EOS
- cmd = prompt or return
- execute cmd
+ if(cmd = prompt)
+ execute cmd
+ else
+ self << "Console session ended."
+ break
+ end