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

**Describe the solution you'd like**
Subset of what `reset` command does.
if (!block_out_stream)
        
            /// Ignore all results when fuzzing as they can be huge.
            if (query_fuzzer_runs)
            
                block_out_stream = std::make_shared<NullBlockOutputStream>(block);
                return;
            }
            WriteBuffer * out_buf = nullptr;
            String pager = config().getString("pager", "");
            if (!pager.empty())
            
                signal(SIGPIPE, SIG_IGN);
                pager_cmd = ShellCommand::execute(pager, true);
                out_buf = &pager_cmd->in;
            }
            else
            
                out_buf = &std_out;
            }
            String current_format = format;
            /// The query can specify output format or output file.
            /// FIXME: try to prettify this cast using `as<>()`
            if (const auto * query_with_output = dynamic_cast<const ASTQueryWithOutput *>(parsed_query.get()))
            
                if (query_with_output->out_file)
                
                    const auto & out_file_node = query_with_output->out_file->as<ASTLiteral &>();
                    const auto & out_file = out_file_node.value.safeGet<std::string>();