| 227 | } |
| 228 | |
| 229 | static void pretty_print_cmdnames(struct cmdnames *cmds, unsigned int colopts) |
| 230 | { |
| 231 | struct string_list list = STRING_LIST_INIT_NODUP; |
| 232 | struct column_options copts; |
| 233 | int i; |
| 234 | |
| 235 | for (i = 0; i < cmds->cnt; i++) |
| 236 | string_list_append(&list, cmds->names[i]->name); |
| 237 | /* |
| 238 | * always enable column display, we only consult column.* |
| 239 | * about layout strategy and stuff |
| 240 | */ |
| 241 | colopts = (colopts & ~COL_ENABLE_MASK) | COL_ENABLED; |
| 242 | memset(&copts, 0, sizeof(copts)); |
| 243 | copts.indent = " "; |
| 244 | copts.padding = 2; |
| 245 | print_columns(&list, colopts, &copts); |
| 246 | string_list_clear(&list, 0); |
| 247 | } |
| 248 | |
| 249 | static void list_commands_in_dir(struct cmdnames *cmds, |
| 250 | const char *path, |
no test coverage detected