Split up shell into shell and shell_continue (so that