On Fri, Mar 6, 2009 at 5:00 PM, Stephen C. Gilardi <squee...@mac.com> wrote: > > On Mar 6, 2009, at 9:44 AM, Mark Volkmann wrote: > >> ctrl-c is the right way to exit under Windows. >> Under UNIX, Linux and Mac OS X, I think ctrl-d is preferred. > > > I agree. > > Here's some more info: > > On the Unixes, ctl-d represents "end-of-file" (end of input stream). Usually > terminals and terminal-like interfaces will send ctl-d immediately to the > process waiting for input even in cases where input would normally be > line-buffered before being sent. ctl-d works to quit the repl immediately on > Linux and Mac OS X. > > On Windows the corresponding end-of-file marker is ctl-z. However in a > default "cmd" window ctl-z doesn't act immediately. Instead, it's > interpreted after pressing return. Both "ctl-z return" and "ctl-c" work to > quit the clojure Repl on Windows. As the latter is more succinct, I think > it's reasonable for it to be preferred.
I tend to use Ctrl-D on Linux/Mac and Ctrl-Z on Windows. The same goes for Python (and sbcl, and psql, and mysql, and bash etc.) This is partly because Ctrl-C doesn't work for exiting the Python "REPL", but actually, I think the Python behaviour is more useful: With Python you can use Ctrl-C to break out of long-running functions/infinite loops. Basically you get a KeyboardInterrupt exception thrown: >>> while True: ... pass ... (Ctrl-C pressed here) Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyboardInterrupt >>> PostgreSQL's command line client, psql, behaves similarly. If you accidentally issue an SQL statement that takes far longer than you meant it to, you can press Ctrl-C and be back where you were before you ran it. With MySQL the mysql client gets killed and you're back at your shell prompt. I feel psql's behaviour is much more friendly. -- Michael Wood <esiot...@gmail.com> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---