summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-02-17 22:48:44 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-02-17 22:48:44 +0000
commit5cdcfdebb7aa8283189ab46f5a50a48c1c1f6b36 (patch)
treeb3c0fbac2f8b5a9492c78ca0fffabc7e54b41659 /src/common
parentca50f2c8fc5549bc3812aabca699c6f3a412f7e2 (diff)
downloadweechat-5cdcfdebb7aa8283189ab46f5a50a48c1c1f6b36.zip
Improved /help command output
Diffstat (limited to 'src/common')
-rw-r--r--src/common/command.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/common/command.c b/src/common/command.c
index cbbadff5b..48e3f85f0 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -1148,29 +1148,31 @@ weechat_cmd_help (int argc, char **argv)
if (argc == 0)
{
- irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf (NULL, "\n");
gui_printf (NULL,
- _("> List of %s internal commands:\n"),
+ _("%s internal commands:\n"),
PACKAGE_NAME);
+ gui_printf (NULL, "\n");
for (i = 0; weechat_commands[i].command_name; i++)
{
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
+ gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
weechat_commands[i].command_name);
gui_printf (NULL, " - %s\n",
_(weechat_commands[i].command_description));
}
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf (NULL, _("> List of IRC commands:\n"));
+ gui_printf (NULL, "\n");
+ gui_printf (NULL, _("IRC commands:\n"));
+ gui_printf (NULL, "\n");
for (i = 0; irc_commands[i].command_name; i++)
+ {
if (irc_commands[i].cmd_function_args || irc_commands[i].cmd_function_1arg)
{
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
+ gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
irc_commands[i].command_name);
gui_printf (NULL, " - %s\n",
_(irc_commands[i].command_description));
}
+ }
}
if (argc == 1)
{
@@ -1178,24 +1180,19 @@ weechat_cmd_help (int argc, char **argv)
{
if (strcasecmp (weechat_commands[i].command_name, argv[0]) == 0)
{
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf (NULL, _("> Help on %s internal command \""), PACKAGE_NAME);
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
- weechat_commands[i].command_name);
- gui_printf (NULL, "\":\n");
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf (NULL, _("Syntax: "));
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
+ gui_printf (NULL, "\n");
+ gui_printf (NULL, "[w]");
+ gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " /%s",
weechat_commands[i].command_name);
if (weechat_commands[i].arguments &&
weechat_commands[i].arguments[0])
- gui_printf (NULL, " %s\n",
+ 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",
+ gui_printf (NULL, "\n%s\n",
_(weechat_commands[i].arguments_description));
return 0;
}
@@ -1205,24 +1202,19 @@ weechat_cmd_help (int argc, char **argv)
if ((strcasecmp (irc_commands[i].command_name, argv[0]) == 0)
&& (irc_commands[i].cmd_function_args || irc_commands[i].cmd_function_1arg))
{
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf (NULL, _("> Help on IRC command \""));
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
- irc_commands[i].command_name);
- gui_printf (NULL, "\":\n");
- irc_display_prefix (NULL, PREFIX_INFO);
- gui_printf (NULL, _("Syntax: "));
- gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "/%s",
+ gui_printf (NULL, "\n");
+ gui_printf (NULL, "[i]");
+ gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " /%s",
irc_commands[i].command_name);
if (irc_commands[i].arguments &&
irc_commands[i].arguments[0])
- gui_printf (NULL, " %s\n",
+ 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",
+ gui_printf (NULL, "\n%s\n",
_(irc_commands[i].arguments_description));
return 0;
}