How to end command in spark shell without exiting current session

I am using control+ C to stop the current executing command but it end my session and i have to login back and do all the coding . Whats the shortcut to end a command