diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-20 21:39:59 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-21 07:23:14 +0300 |
commit | 6bb2dc0b9472a84c7d17ee93bda28a7c1c97d415 (patch) | |
tree | a7e2eb1915f25ed24190aaacbf2e26e9146c8737 /help.h | |
parent | e5d7a61953c236fbc468bc1bb01383766d2cb55b (diff) |
completion: implement and use --list-cmds=main,others
This is part of the effort to break down and provide commands by
category in machine-readable form. This could be helpful later on when
completion script switches to use --list-cmds for selecting
completable commands. It would be much easier for the user to choose
to complete _all_ commands instead of the default selection by passing
different values to --list-cmds in git-completino.bash.
While at there, replace "git help -a" in git-completion.bash with
--list-cmds since it's better suited for this task.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.h')
-rw-r--r-- | help.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,6 +1,8 @@ #ifndef HELP_H #define HELP_H +struct string_list; + struct cmdnames { int alloc; int cnt; @@ -17,6 +19,8 @@ static inline void mput_char(char c, unsigned int num) } extern void list_common_cmds_help(void); +extern void list_all_main_cmds(struct string_list *list); +extern void list_all_other_cmds(struct string_list *list); extern const char *help_unknown_cmd(const char *cmd); extern void load_command_list(const char *prefix, struct cmdnames *main_cmds, |