Permalink
Browse files

Improved help command

help(commandName)
Added whitespace
#257
  • Loading branch information...
1 parent e1e60e6 commit a7d353d3ae08038a38e118b179e96a0e370b2379 @mothur-westcott mothur-westcott committed Aug 2, 2016
Showing with 333 additions and 12 deletions.
  1. +8 −4 source/commandfactory.cpp
  2. +1 −1 source/commands/clustercommand.cpp
  3. +318 −5 source/commands/helpcommand.cpp
  4. +6 −2 source/commands/helpcommand.h
View
@@ -973,11 +973,15 @@ bool CommandFactory::isValidCommand(string command, string noError) {
/***********************************************************************/
void CommandFactory::printCommands(ostream& out) {
try {
- out << "Valid commands are: ";
- for (it = commands.begin(); it != commands.end(); it++) {
- out << it->first << ",";
+ it = commands.begin();
+ out << "Valid commands are: " << it->first << ", ";
+ it++;
+ out << it->first;
+ it++;
+ for (; it != commands.end(); it++) {
+ out << ", " << it->first;
}
- out << endl;
+ out << "." << endl;
}
catch(exception& e) {
m->errorOut(e, "CommandFactory", "printCommands");
@@ -48,7 +48,7 @@ vector<string> ClusterCommand::setParameters(){
string ClusterCommand::getHelpString(){
try {
string helpString = "";
- helpString += "The cluster command parameter options are phylip, column, name, count, method, cuttoff, precision, sim, showabund and timing. Fasta or Phylip or column and name are required.\n";
+ helpString += "The cluster command parameter options are phylip, column, name, count, method, cutoff, precision, sim, showabund and timing. Fasta or Phylip or column and name are required.\n";
//helpString += "The adjust parameter is used to handle missing distances. If you set a cutoff, adjust=f by default. If not, adjust=t by default. Adjust=f, means ignore missing distances and adjust cutoff as needed with the average neighbor method. Adjust=t, will treat missing distances as 1.0. You can also set the value the missing distances should be set to, adjust=0.5 would give missing distances a value of 0.5.\n";
helpString += "The phylip and column parameter allow you to enter your distance file. \n";
helpString += "The fasta parameter allows you to enter your fasta file for use with the agc or dgc methods. \n";
Oops, something went wrong.

0 comments on commit a7d353d

Please sign in to comment.