On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> > --- > diff --git a/help.c b/help.c > @@ -228,6 +228,21 @@ void list_common_cmds_help(void) > +void list_all_cmds(void) > +{ > + struct cmdnames main_cmds, other_cmds; > + int i; > + > + memset(&main_cmds, 0, sizeof(main_cmds)); > + memset(&other_cmds, 0, sizeof(other_cmds)); > + load_command_list("git-", &main_cmds, &other_cmds); > + > + for (i = 0; i < main_cmds.cnt; i++) > + puts(main_cmds.names[i]->name); > + for (i = 0; i < other_cmds.cnt; i++) > + puts(other_cmds.names[i]->name); clean_cmdnames(&main_cmds); clean_cmdnames(&other_cmds); > +}