summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/command.c24
-rw-r--r--weechat/src/common/command.c24
2 files changed, 32 insertions, 16 deletions
diff --git a/src/common/command.c b/src/common/command.c
index d38395bc3..5eec62a7a 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -1173,10 +1173,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
weechat_commands[i].command_name);
- gui_printf (NULL, " %s\n",
- (weechat_commands[i].arguments) ?
- _(weechat_commands[i].arguments) : "");
- if (weechat_commands[i].arguments_description)
+ if (weechat_commands[i].arguments &&
+ weechat_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(weechat_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (weechat_commands[i].arguments_description &&
+ weechat_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(weechat_commands[i].arguments_description));
return 0;
@@ -1196,10 +1200,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
irc_commands[i].command_name);
- gui_printf (NULL, "%s\n",
- (irc_commands[i].arguments) ?
- _(irc_commands[i].arguments) : "");
- if (irc_commands[i].arguments_description)
+ if (irc_commands[i].arguments &&
+ irc_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(irc_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (irc_commands[i].arguments_description &&
+ irc_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(irc_commands[i].arguments_description));
return 0;
diff --git a/weechat/src/common/command.c b/weechat/src/common/command.c
index d38395bc3..5eec62a7a 100644
--- a/weechat/src/common/command.c
+++ b/weechat/src/common/command.c
@@ -1173,10 +1173,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
weechat_commands[i].command_name);
- gui_printf (NULL, " %s\n",
- (weechat_commands[i].arguments) ?
- _(weechat_commands[i].arguments) : "");
- if (weechat_commands[i].arguments_description)
+ if (weechat_commands[i].arguments &&
+ weechat_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(weechat_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (weechat_commands[i].arguments_description &&
+ weechat_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(weechat_commands[i].arguments_description));
return 0;
@@ -1196,10 +1200,14 @@ weechat_cmd_help (int argc, char **argv)
gui_printf (NULL, _("Syntax: "));
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
irc_commands[i].command_name);
- gui_printf (NULL, "%s\n",
- (irc_commands[i].arguments) ?
- _(irc_commands[i].arguments) : "");
- if (irc_commands[i].arguments_description)
+ if (irc_commands[i].arguments &&
+ irc_commands[i].arguments[0])
+ gui_printf (NULL, " %s\n",
+ _(irc_commands[i].arguments));
+ else
+ gui_printf (NULL, "\n");
+ if (irc_commands[i].arguments_description &&
+ irc_commands[i].arguments_description[0])
gui_printf (NULL, "%s\n",
_(irc_commands[i].arguments_description));
return 0;