void acceptUserInputUntilExit() throws IOException, CancelEditException, CancelDeleteException, ParseException {
		try {
			engine.executeCommand(new DisplayCommandType());
			console.setPrompt(MESSAGE_COMMAND_PROMPT);
			console.addCompleter(new StringsCompleter(this.getCommandsList()));
			String line = null;
			while ((line = console.readLine()) != null) {
				CommandType toPassToEngine;
				try {
					if(line.length()<2){
						throw new InvalidCommandException();
					}
					toPassToEngine = interpretCommand(line);
					assert(toPassToEngine != null);
					console.setPrompt("");
					console.clearScreen();
					console.setPrompt(MESSAGE_COMMAND_PROMPT);
					//console.flush();
					engine.executeCommand(toPassToEngine);
					//console.flush();
					if(!toPassToEngine.getType().equals("display") && !toPassToEngine.getType().equals("search")){
						uiHandler.printToTerminal("");
						engine.executeCommand(new DisplayCommandType());
					}
				} catch (InvalidCommandException e) {
					console.setPrompt("");
					console.clearScreen();
					console.setPrompt(MESSAGE_COMMAND_PROMPT);
					uiHandler.printToDisplayRed(MESSAGE_INVALID_COMMAND);
					uiHandler.printToTerminal("");
					engine.executeCommand(new DisplayCommandType());
				}
				catch (ExitException e) {
					System.exit(0);
				}

			}
		} catch(IOException e) {
			e.printStackTrace();
		} finally {
			try {
				TerminalFactory.get().restore();
			} catch(Exception e) {
				e.printStackTrace();
			}
		}
		/*String userInput;
		do{
			uiHandler.resetToDefault();
			uiHandler.printToTerminal(MESSAGE_COMMAND_PROMPT, "inline");
			userInput = input.nextLine();
			CommandType toPassToEngine;
			try {
				toPassToEngine = interpretCommand(userInput);
				assert(toPassToEngine != null);
				engine.executeCommand(toPassToEngine);
			} catch (InvalidCommandException e) {
				uiHandler.printToTerminal(MESSAGE_INVALID_COMMAND);
			}
			catch (ExitException e) {
				System.exit(0);
			}
		} while(!userInput.equalsIgnoreCase("exit"));
		input.close();*/
	}