It is a common pattern to exit a repl inserting an EOF character (Ctrl+D in most unixes). This pull request makes that possible while also relaxing the strict comparison against the exit() and clear() strings. I noticed that if I introduced a space before the function name like this: exit() then it wouldn't exit. An even better version of this would call a real exit function that would finish the thread.
It is a common pattern to exit a repl inserting an EOF character (Ctrl+D in most unixes). This pull request makes that possible while also relaxing the strict comparison against the
exit()
andclear()
strings. I noticed that if I introduced a space before the function name like this:exit()
then it wouldn't exit. An even better version of this would call a real exit function that would finish the thread.