- ALLOC_GROW(main_cmds.names, main_cmds.cnt + other_cmds.cnt,
- main_cmds.alloc);
- memcpy(main_cmds.names + main_cmds.cnt, other_cmds.names,
- other_cmds.cnt * sizeof(other_cmds.names[0]));
- main_cmds.cnt += other_cmds.cnt;
- free(other_cmds.names);
+ add_cmd_list(&main_cmds, &aliases);
+ add_cmd_list(&main_cmds, &other_cmds);
+ qsort(main_cmds.names, main_cmds.cnt,
+ sizeof(main_cmds.names), cmdname_compare);
+ uniq(&main_cmds);