void list_common_guides_help(void) { struct category_description catdesc[] = { { CAT_guide, N_("The common Git guides are:") }, { 0, NULL } }; print_cmd_by_category(catdesc); putchar('\n'); }
void list_all_cmds_help(void) { struct string_list others = STRING_LIST_INIT_DUP; struct string_list alias_list = STRING_LIST_INIT_DUP; struct cmdname_help *aliases; int i, longest; printf_ln(_("See 'git help <command>' to read about a specific subcommand")); print_cmd_by_category(main_categories, &longest); list_all_other_cmds(&others); if (others.nr) printf("\n%s\n", _("External commands")); for (i = 0; i < others.nr; i++) printf(" %s\n", others.items[i].string); string_list_clear(&others, 0); git_config(get_alias, &alias_list); string_list_sort(&alias_list); for (i = 0; i < alias_list.nr; i++) { size_t len = strlen(alias_list.items[i].string); if (longest < len) longest = len; } if (alias_list.nr) { printf("\n%s\n", _("Command aliases")); ALLOC_ARRAY(aliases, alias_list.nr + 1); for (i = 0; i < alias_list.nr; i++) { aliases[i].name = alias_list.items[i].string; aliases[i].help = alias_list.items[i].util; aliases[i].category = 1; } aliases[alias_list.nr].name = NULL; print_command_list(aliases, 1, longest); free(aliases); } string_list_clear(&alias_list, 1); }
void list_all_cmds_help(void) { print_cmd_by_category(main_categories); }
void list_common_cmds_help(void) { puts(_("These are common Git commands used in various situations:")); print_cmd_by_category(common_categories); }