settings.getTerminal().init(settings.getInputStream(), settings.getStdOut(), settings.getStdErr());
editMode = settings.getEditMode();
undoManager = new UndoManager();
pasteManager = new PasteManager();
buffer = new Buffer(settings.isAnsiConsole(), null);
if(settings.isHistoryPersistent())
history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
settings.getHistorySize());
else