presto-cli/src/main/java/io/prestosql/cli/ConsolePrinter.java/ConsolePrinter/reprintLine
class ConsolePrinter:    public void reprintLine(String line)
    {
        if (isRealTerminal()) {
            out.print(ERASE_LINE_ALL + line + "\n");
        }
        else {
            out.print('\r' + line);
        }
        out.flush();
        lines++;
    }