mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
modules/console: Format help cmd list into columns.
This commit is contained in:
parent
80f8ae9547
commit
5c89a2b030
1 changed files with 4 additions and 1 deletions
|
@ -373,6 +373,7 @@ console_cmd__help(opt &out, const string_view &line)
|
|||
std::min(token_count(line, ' '), cmd::MAX_DEPTH)
|
||||
};
|
||||
|
||||
size_t num(0);
|
||||
for(size_t e(elems+1); e > 0; --e)
|
||||
{
|
||||
const auto name
|
||||
|
@ -410,7 +411,9 @@ console_cmd__help(opt &out, const string_view &line)
|
|||
if(empty(suffix))
|
||||
continue;
|
||||
|
||||
out << suffix << std::endl;
|
||||
out << std::left << std::setw(20) << suffix;
|
||||
if(++num % 4 == 0)
|
||||
out << std::endl;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue