mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-06 12:06:26 +00:00
Make command listing less noisy
It's still not great, but at least it's a little clearer. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -45,13 +45,18 @@ static struct command *find_command(char *name)
|
||||
static void usage(void)
|
||||
{
|
||||
struct command *com;
|
||||
int largest = 0;
|
||||
|
||||
fprintf(stderr, "usage: scoutfs <command> [<args>]\n"
|
||||
"Commands:\n");
|
||||
|
||||
cmd_for_each(com)
|
||||
largest = max(strlen(com->name), largest);
|
||||
|
||||
cmd_for_each(com) {
|
||||
fprintf(stderr, " %8s %12s - %s\n",
|
||||
com->name, com->opts, com->summary);
|
||||
fprintf(stderr, " %*s %s\n %*s %s\n",
|
||||
largest, com->name, com->opts,
|
||||
largest, "", com->summary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user