0
0
Fork 0
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:
Jason Volk 2019-09-12 09:54:42 -07:00
parent 80f8ae9547
commit 5c89a2b030

View file

@ -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;