Added support for Ctrl+D (end of file) in shell