]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
completion: implement and use --list-cmds=main,others
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 376a59b97fad6183ec0eed4b77a51cabd5ebbb2c..10907f7266331f0d34a6262ef1257940aafeca2f 100644 (file)
--- a/git.c
+++ b/git.c
@@ -56,6 +56,10 @@ static int list_cmds(const char *spec)
 
                if (match_token(spec, len, "builtins"))
                        list_builtins(&list, 0);
+               else if (match_token(spec, len, "main"))
+                       list_all_main_cmds(&list);
+               else if (match_token(spec, len, "others"))
+                       list_all_other_cmds(&list);
                else
                        die(_("unsupported command listing type '%s'"), spec);
                spec += len;