]> git.donarmstrong.com Git - mothur.git/commitdiff
allow user to input quit instead of quit()
authorwestcott <westcott>
Tue, 2 Jun 2009 16:10:12 +0000 (16:10 +0000)
committerwestcott <westcott>
Tue, 2 Jun 2009 16:10:12 +0000 (16:10 +0000)
engine.cpp

index 11d738dd0f2384b42a26f21349eeaa7bbca80a2a..add84b9e944ceeaaee5cd4313836bca2a751315d 100644 (file)
@@ -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);