if(nextCommand != NULL) { add_history(nextCommand); }
else{ //^D causes null string and we want it to quit mothur
- nextCommand = "quit";
+ strcpy(nextCommand, "quit");
mout->mothurOut(nextCommand);
}
string nextCommand = "";
mout->mothurOut("mothur > ");
- m->getline(cin, nextCommand);
+ getline(cin, nextCommand);
mout->mothurOutJustToLog(toString(nextCommand));
return nextCommand;
string nextcommand = "";
int count = 0;
+ bool ignoreSemiColons = false;
//go through string until you reach ; or end
while (count < commandString.length()) {
- if (commandString[count] == ';') { break; }
+ //you want to ignore any ; until you reach the next '
+ if ((commandString[count] == '\'') && (!ignoreSemiColons)) { ignoreSemiColons = true; }
+ else if ((commandString[count] == '\'') && (ignoreSemiColons)) { ignoreSemiColons = false; }
+
+ if ((commandString[count] == ';') && (!ignoreSemiColons)) { break; }
else { nextcommand += commandString[count]; }
count++;