Open aphorise opened 9 years ago
I think this is the behaviour how Node.js REPL is implemented...
Indeed it is how REPL is implemented in Node.js though I was wondering if there was any way of intercepting / preventing this? Perhaps by over-writting a specific function? Thus far I've had no luck with streams or other hacks that I've tried such as delete
-ing REPL
module object or specifics of its child REPL.repl
Try looking at the source code. El 03/11/2015 23:39, "aphorise" notifications@github.com escribió:
Indeed it is how REPL is implemented in Node.js though I was wondering if there was any way of intercepting / preventing this? Perhaps by over-writting a specific function? Thus far I've had no luck with streams or other hacks that I've tried such as delete-ing REPL module object or specifics of its child REPL.repl
— Reply to this email directly or view it on GitHub https://github.com/chjj/blessed/issues/179#issuecomment-153511699.
I'm starting a repl like:
I'd like a way of preventing
CTRL+C
or any other form of.exit
from repl. Is this possible or can you advise of any possible approach to be able to dynamically step into repl mode & back?Currently I have a working model which is close where I start repl in the application (with shortcut) - however even though the first
C-c
is intercepted by blessed I'm not able to stop the repl from exiting where its pressed again.Ideally I'd like a way to be able to switch between repl & blessed as required / on demand without the risk of the main process being closed.
Thanks very much.