From a2edaadb975e5cb5d6cf68353bfe95f53235600d Mon Sep 17 00:00:00 2001 From: westcott Date: Tue, 2 Jun 2009 16:10:12 +0000 Subject: [PATCH] allow user to input quit instead of quit() --- engine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine.cpp b/engine.cpp index 11d738d..add84b9 100644 --- a/engine.cpp +++ b/engine.cpp @@ -64,6 +64,9 @@ bool InteractEngine::getInput(){ getline(cin, input); if (cin.eof()) { input = "quit()"; } + //allow user to omit the () on the quit command + if (input == "quit") { input = "quit()"; } + errorFree = errorCheckor->checkInput(input); if (errorFree == true) { CommandOptionParser parser(input); @@ -145,6 +148,10 @@ bool BatchEngine::getInput(){ if (inputBatchFile.eof()) { input = "quit()"; } cout << endl << "mothur > " << input << endl; + + //allow user to omit the () on the quit command + if (input == "quit") { input = "quit()"; } + errorFree = errorCheckor->checkInput(input); if (errorFree == true) { CommandOptionParser parser(input); -- 2.39.2