Make shell more tolerant: allow `;` at the end of input, allow non-query expressions.