summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-20 18:40:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-21 04:23:14 (GMT)
commit6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7 (patch)
tree71a94d34f45c4de8f34a3c9c9b8b6e0f350e2771 /git.c
parent3301d36b29467a05107340e4d9688ebf74335021 (diff)
downloadgit-6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7.zip
git-6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7.tar.gz
git-6532f3740b1c228c0a2a03a4126f4f7e4f2d73e7.tar.bz2
completion: allow to customize the completable command list
By default we show porcelain, external commands and a couple others that are also popular. If you are not happy with this list, you can now customize it a new config variable. 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 'git.c')
-rw-r--r--git.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/git.c b/git.c
index 63acd9e..447dac0 100644
--- a/git.c
+++ b/git.c
@@ -77,6 +77,8 @@ static int list_cmds(const char *spec)
exclude_helpers_from_list(&list);
else if (match_token(spec, len, "alias"))
list_aliases(&list);
+ else if (match_token(spec, len, "config"))
+ list_cmds_by_config(&list);
else if (len > 5 && !strncmp(spec, "list-", 5)) {
struct strbuf sb = STRBUF_INIT;