**Use case**
Some program left garbage in terminal.

**Describe the solution you'd like**
Subset of what `reset` command does.
ption);
            receiveEndOfQuery();
        }
    }
    ASTPtr parseQuery(c & pos, c end, bool allow_multi_statements)
    
        ParserQuery parser(end);
        ASTPtr res;
        const auto & settings = context.getSettingsRef();
        size_t max_length = 0;
        if (!allow_multi_statements)
            max_length = settings.max_query_size;
        if (is_interactive || ignore_error)
        
            String message;
            res = tryParseQuery(parser, pos, end, message, true, "", allow_multi_statements, max_length, settings.max_parser_depth);
            if (!res)
            
                std::ce << message << st << st;
                return nullptr;
            }
        }
        else
            res = parseQueryAndMovePosition(parser, pos, end, "", allow_multi_statements, max_length, settings.max_parser_depth);
        if (is_interactive)
        
            std::cout << st;
            WriteBufferFromOStream res_buf(std::cout, 4096);
            formatAST(*res, res_buf);
            res_buf.next();