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;
mout->executing = true;
#ifdef USE_MPI
int pid, numProcesses;
- MPI_Status status;
MPI_Comm_rank(MPI_COMM_WORLD, &pid);
MPI_Comm_size(MPI_COMM_WORLD, &numProcesses);
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++;