String (@NotNull String currentLine) { // for windows platform output is assumed in format suitable for terminal emulator // for instance, same text could be returned twice with '\r' symbol in between (so in emulator output we'll still see correct // text without duplication) // because of this we manually process '\r' occurrences to get correct output return removeAllBeforeCaretReturn(currentLine); }