From 3e9a270562442682b712c980f3ae8b57b1008ff6 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 20 Feb 2022 16:29:21 +0100 Subject: [PATCH] Merge pull request #72 from ailin-nemui/load-silent-doc add -silent switch in syntax comment and respect it without args (cherry picked from commit 06a7dcad991c83e9df92f6765164bcfef6c34108) --- src/fe-common/core/fe-modules.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/fe-modules.c b/src/fe-common/core/fe-modules.c index 01b603f5..955b9a9e 100644 --- a/src/fe-common/core/fe-modules.c +++ b/src/fe-common/core/fe-modules.c @@ -164,7 +164,7 @@ static void module_prefixes_free(char **list) g_free(list); } -/* SYNTAX: LOAD [] */ +/* SYNTAX: LOAD [-silent] [] */ static void cmd_load(const char *data) { char *rootmodule, *submodule; @@ -181,9 +181,11 @@ static void cmd_load(const char *data) silent = g_hash_table_lookup(optlist, "silent") != NULL; - if (*rootmodule == '\0') - cmd_load_list(); - else { + if (*rootmodule == '\0') { + if (!silent) { + cmd_load_list(); + } + } else { if (silent) { signal_add_first("module error", (SIGNAL_FUNC) signal_stop); signal_add_first("module loaded", (SIGNAL_FUNC) signal_stop);