Yes, you are absolutely right, it's Ctrl-Z, not Ctrl-D. Apparently I confused it with Linux's way of makring the end of the input.
To exit more opened that way you should send the EOF character: Ctrl-D Enter. This should be entered on an empty line.