From 91a9af72b188bda7dc3638689a7074a29074f9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 7 Apr 2024 15:28:34 +0200 Subject: [PATCH] doc: generate doc for all commands except default aliases --- src/core/core-doc.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/core/core-doc.c b/src/core/core-doc.c index 2a0ce8f54..655a295c9 100644 --- a/src/core/core-doc.c +++ b/src/core/core-doc.c @@ -191,26 +191,14 @@ doc_gen_close_file (const char *path, const char *doc, const char *name, } /* - * Checks if a command must be documented or not. - * - * All commands whose name == plugin name are documented, and all commands for - * these plugins are documented as well: - * - weechat (core) - * - irc - * - xfer + * Checks if a command must be documented or not: all commands are documented + * except the default aliases (that create commands). */ int doc_gen_check_command (const char *plugin, const char *command) { - /* command name is the same as plugin: to document! */ - if (strcmp (plugin, command) == 0) - return 1; - - /* document other options only for weechat, irc, xfer */ - return ((strcmp (plugin, "weechat") == 0) - || (strcmp (plugin, "irc") == 0) - || (strcmp (plugin, "xfer") == 0)) ? + return ((strcmp (plugin, "alias") != 0) || (strcmp (plugin, command) == 0)) ? 1 : 0; }