Merge branch 'nd/help-align-command-desc'
Output from "git help" was not correctly aligned, which has been fixed. * nd/help-align-command-desc: help: align the longest command in the command listing
This commit is contained in:
commit
75e1a08b60
3
help.c
3
help.c
@ -85,7 +85,8 @@ static void print_command_list(const struct cmdname_help *cmds,
|
|||||||
if (cmds[i].category & mask) {
|
if (cmds[i].category & mask) {
|
||||||
size_t len = strlen(cmds[i].name);
|
size_t len = strlen(cmds[i].name);
|
||||||
printf(" %s ", cmds[i].name);
|
printf(" %s ", cmds[i].name);
|
||||||
mput_char(' ', longest > len ? longest - len : 1);
|
if (longest > len)
|
||||||
|
mput_char(' ', longest - len);
|
||||||
puts(_(cmds[i].help));
|
puts(_(cmds[i].help));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user