currentLine = history.getCommand(historyIndex); out.print(currentLine); posOnCurrentLine = currentLine.length();
currentLine.setContent(history.getCommand(historyIndex));  refreshCurrentLine(); currentLine.moveEnd();
    private void redisplay() {        //  clear the line        if (console != null) {            console.clearLine(console.getCursorY());        }        //  display the prompt        out.print(currentPrompt);        //  display the required history/current line        if (historyIndex == -1)            currentLine = newestLine;        else            currentLine = history.getCommand(historyIndex);        out.print(currentLine);        posOnCurrentLine = currentLine.length();    }