Exit is triggered by Ctrl^D rather than Ctrl^C. And some shell commands are added.