Hide commands that don't have a description
These are assumed to be internal.
This commit is contained in:
		
							parent
							
								
									05c45f301d
								
							
						
					
					
						commit
						1c58e13bee
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -50,8 +50,11 @@ void MultiCommand::printHelp(const string & programName, std::ostream & out)
 | 
			
		|||
    out << "Available commands:\n";
 | 
			
		||||
 | 
			
		||||
    Table2 table;
 | 
			
		||||
    for (auto & command : commands)
 | 
			
		||||
        table.push_back(std::make_pair(command.second->name(), command.second->description()));
 | 
			
		||||
    for (auto & command : commands) {
 | 
			
		||||
        auto descr = command.second->description();
 | 
			
		||||
        if (!descr.empty())
 | 
			
		||||
            table.push_back(std::make_pair(command.second->name(), descr));
 | 
			
		||||
    }
 | 
			
		||||
    printTable(out, table);
 | 
			
		||||
 | 
			
		||||
    out << "\n";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue