summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-command.c369
-rw-r--r--src/plugins/alias/alias.c10
-rw-r--r--src/plugins/aspell/weechat-aspell.c6
-rw-r--r--src/plugins/charset/charset.c3
-rw-r--r--src/plugins/demo/demo.c34
-rw-r--r--src/plugins/irc/irc-command.c365
-rw-r--r--src/plugins/logger/logger.c4
-rw-r--r--src/plugins/relay/relay-command.c6
-rw-r--r--src/plugins/rmodifier/rmodifier-command.c7
-rw-r--r--src/plugins/scripts/script.c22
-rw-r--r--src/plugins/xfer/xfer-command.c4
11 files changed, 481 insertions, 349 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index aafd622a6..9030f8433 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -1483,8 +1483,9 @@ COMMAND_CALLBACK(help)
{
struct t_hook *ptr_hook;
struct t_config_option *ptr_option;
- int i, length, command_found;
- char *string;
+ int i, length, command_found, first_line_displayed;
+ char *string, *ptr_string, *pos_double_pipe, *pos_end;
+ char empty_string[1] = { '\0' }, str_format[64];
/* make C compiler happy */
(void) data;
@@ -1556,6 +1557,7 @@ COMMAND_CALLBACK(help)
}
/* look for command */
+ command_found = 0;
for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
@@ -1565,19 +1567,63 @@ COMMAND_CALLBACK(help)
&& (string_strcasecmp (HOOK_COMMAND(ptr_hook, command),
argv[1]) == 0))
{
+ command_found = 1;
gui_chat_printf (NULL, "");
- gui_chat_printf (NULL,
- "%s[%s%s%s] %s/%s %s%s",
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT),
- plugin_get_name (ptr_hook->plugin),
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
- HOOK_COMMAND(ptr_hook, command),
- GUI_COLOR(GUI_COLOR_CHAT),
- (HOOK_COMMAND(ptr_hook, args)
- && HOOK_COMMAND(ptr_hook, args)[0]) ?
- _(HOOK_COMMAND(ptr_hook, args)) : "");
+ length = utf8_strlen_screen (plugin_get_name (ptr_hook->plugin)) +
+ utf8_strlen_screen (HOOK_COMMAND(ptr_hook, command)) + 7;
+ snprintf (str_format, sizeof (str_format),
+ "%%-%ds%%s", length);
+ first_line_displayed = 0;
+ ptr_string = (HOOK_COMMAND(ptr_hook, args) && HOOK_COMMAND(ptr_hook, args)[0]) ?
+ _(HOOK_COMMAND(ptr_hook, args)) : empty_string;
+ while (ptr_string)
+ {
+ string = NULL;
+ pos_double_pipe = strstr (ptr_string, "||");
+ if (pos_double_pipe)
+ {
+ pos_end = pos_double_pipe - 1;
+ while ((pos_end > ptr_string) && (pos_end[0] == ' '))
+ {
+ pos_end--;
+ }
+ string = string_strndup (ptr_string,
+ pos_end - ptr_string + 1);
+ }
+ if (first_line_displayed)
+ {
+ gui_chat_printf (NULL, str_format,
+ " ",
+ (string) ? string : ptr_string);
+ }
+ else
+ {
+ gui_chat_printf (NULL,
+ "%s[%s%s%s] %s/%s %s%s",
+ GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
+ GUI_COLOR(GUI_COLOR_CHAT),
+ plugin_get_name (ptr_hook->plugin),
+ GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
+ GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
+ HOOK_COMMAND(ptr_hook, command),
+ GUI_COLOR(GUI_COLOR_CHAT),
+ (string) ? string : ptr_string);
+ first_line_displayed = 1;
+ }
+ if (string)
+ free (string);
+
+ if (pos_double_pipe)
+ {
+ ptr_string = pos_double_pipe + 2;
+ while (ptr_string[0] == ' ')
+ {
+ ptr_string++;
+ }
+ }
+ else
+ ptr_string = NULL;
+ }
if (HOOK_COMMAND(ptr_hook, description)
&& HOOK_COMMAND(ptr_hook, description)[0])
{
@@ -1592,9 +1638,10 @@ COMMAND_CALLBACK(help)
gui_chat_printf (NULL, "%s",
_(HOOK_COMMAND(ptr_hook, args_description)));
}
- return WEECHAT_RC_OK;
}
}
+ if (command_found)
+ return WEECHAT_RC_OK;
/* look for option */
config_file_search_with_string (argv[1], NULL, NULL, &ptr_option, NULL);
@@ -4381,7 +4428,7 @@ command_init ()
{
hook_command (NULL, "away",
N_("toggle away status"),
- N_("[-all] [message]"),
+ N_("[-all] [<message>]"),
N_(" -all: toggle away status on all connected "
"servers\n"
"message: message for away (if no message is "
@@ -4389,13 +4436,19 @@ command_init ()
"-all", &command_away, NULL);
hook_command (NULL, "bar",
N_("manage bars"),
- N_("[add barname type[,cond1,cond2,...] position size "
- "separator item1,item2,...] | [default] | "
- "[del barname|-all] | [set barname option value] | "
- "[hide|show|toggle barname] | [scroll barname buffer "
- "scroll_value] | [list] | [listfull] | [listitems]"),
- N_(" add: add a new bar\n"
- " barname: name of bar (must be unique)\n"
+ N_("list|listfull|listitems"
+ " || add <name> <type>[,<cond1>[,<cond2>...]] <position> "
+ "<size> <separator> <item1>[,<item2>...]"
+ " || default"
+ " || del <name>|-all"
+ " || set <name> <option> <value>"
+ " || hide|show|toggle <name>"
+ " || scroll <name> <buffer> <scroll_value>"),
+ N_(" list: list all bars\n"
+ " listfull: list all bars (verbose)\n"
+ " listitems: list all bar items\n"
+ " add: add a new bar\n"
+ " name: name of bar (must be unique)\n"
" type: root: outside windows,\n"
" window: inside windows, with optional "
"conditions (see below)\n"
@@ -4420,16 +4473,13 @@ command_init ()
" hide: hide a bar\n"
" show: show an hidden bar\n"
" toggle: hide/show a bar\n"
- " scroll: scroll bar up/down\n"
+ " scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' "
"means current buffer, you should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by "
"'+', '-', 'b' (beginning) or 'e' (end), value (for +/-), "
"and optional %% (to scroll by %% of width/height, "
- "otherwise value is number of chars)\n"
- " list: list all bars\n"
- " listfull: list all bars (verbose)\n"
- " listitems: list all bar items\n\n"
+ "otherwise value is number of chars)\n\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
" /bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion\n"
@@ -4441,25 +4491,33 @@ command_init ()
" /bar scroll nicklist #weechat y-100%\n"
" scroll to end of nicklist on current buffer:\n"
" /bar scroll nicklist * ye"),
- "add %(bars_names) root|window bottom|top|left|right"
+ "list"
+ " || listfull"
+ " || listitems"
+ " || add %(bars_names) root|window bottom|top|left|right"
" || default"
" || del %(bars_names)|-all"
" || set %(bars_names) %(bars_options)"
" || hide %(bars_names)"
" || show %(bars_names)"
" || toggle %(bars_names)"
- " || scroll %(bars_names) %(buffers_plugins_names)|*"
- " || list"
- " || listfull"
- " || listitems",
+ " || scroll %(bars_names) %(buffers_plugins_names)|*",
&command_bar, NULL);
hook_command (NULL, "buffer",
N_("manage buffers"),
- N_("[clear [number | -merged | -all] | move number | "
- "merge number | unmerge [number] | close [n1[-n2]] | "
- "list | notify level | localvar | set property value | "
- "get property | number | name]"),
- N_(" clear: clear buffer content (number for a buffer, "
+ N_("list"
+ " || clear [<number>|-merged|-all]"
+ " || move|merge <number>"
+ " || unmerge [<number>]"
+ " || close [<n1>[-<n2>]]"
+ " || notify <level>"
+ " || localvar"
+ " || set <property> <value>"
+ " || get <property>"
+ " || <number>|<name>"),
+ N_(" list: list buffers (without argument, this list is "
+ "displayed)\n"
+ " clear: clear buffer content (number for a buffer, "
"-merged for merged buffers, -all for all buffers, or "
"nothing for current buffer)\n"
" move: move buffer in the list (may be relative, for "
@@ -4471,8 +4529,6 @@ command_init ()
" unmerge: unmerge buffer from other buffers which have "
"same number\n"
" close: close buffer (number/range is optional)\n"
- " list: list buffers (without argument, this list is "
- "displayed)\n"
" notify: set notify level for current buffer: this "
"level determines whether buffer will be added to "
"hotlist or not:\n"
@@ -4524,7 +4580,9 @@ command_init ()
&command_buffer, NULL);
hook_command (NULL, "color",
N_("define color aliases and display palette of colors"),
- N_("[alias color name] | [unalias color] | reset"),
+ N_("alias <color> <alias>"
+ " || unalias <color>"
+ " || reset"),
N_(" alias: add an alias for a color\n"
"unalias: delete an alias\n"
" color: color number (>= 1, max depends on terminal, "
@@ -4545,7 +4603,7 @@ command_init ()
&command_color, NULL);
hook_command (NULL, "command",
N_("launch explicit WeeChat or plugin command"),
- N_("plugin command"),
+ N_("<plugin> <command>"),
N_(" plugin: plugin name ('weechat' for WeeChat internal "
"command)\n"
"command: command to execute (a '/' is automatically "
@@ -4554,9 +4612,12 @@ command_init ()
&command_command, NULL);
hook_command (NULL, "debug",
N_("control debug for core/plugins"),
- N_("[list | set plugin level | dump [plugin] | buffer | "
- "windows | term | color]"),
- N_(" set: set log level for plugin\n"
+ N_("list"
+ " || set <plugin> <level>"
+ " || dump [<plugin>]"
+ " || buffer|windows|term|color"),
+ N_(" list: list plugins with debug levels\n"
+ " set: set debug level for plugin\n"
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same "
@@ -4564,8 +4625,7 @@ command_init ()
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
"windows: display windows tree\n"
- " term: display infos about terminal and available "
- "colors\n"
+ " term: display infos about terminal\n"
" color: display infos about current color pairs"),
"list"
" || set %(plugins_names)|core"
@@ -4578,9 +4638,10 @@ command_init ()
hook_command (NULL, "filter",
N_("filter messages in buffers, to hide/show them according "
"to tags or regex"),
- N_("[list] | [enable|disable|toggle [name]] | "
- "[add name plugin.buffer tags regex] | "
- "[del name|-all]"),
+ N_("list"
+ " || enable|disable|toggle [<name>]"
+ " || add <name> <plugin.buffer> <tags> <regex>"
+ " || del <name>|-all"),
N_(" list: list all filters\n"
" enable: enable filters (filters are enabled by "
"default)\n"
@@ -4634,37 +4695,76 @@ command_init ()
&command_filter, NULL);
hook_command (NULL, "help",
N_("display help about commands and options"),
- N_("[command | option]"),
+ N_("<command>"
+ " || <option>"),
N_("command: a command name\n"
" option: an option name (use /set to see list)"),
"%(commands)|%(config_options)",
&command_help, NULL);
hook_command (NULL, "history",
N_("show buffer command history"),
- N_("[clear | value]"),
+ N_("clear"
+ " || <value>"),
N_("clear: clear history\n"
"value: number of history entries to show"),
"clear",
&command_history, NULL);
hook_command (NULL, "input",
N_("functions for command line"),
- "return | complete_next | complete_previous | search_next | "
- "delete_previous_char | delete_next_char | "
- "delete_previous_word | delete_next_word | "
- "delete_beginning_of_line | delete_end_of_line | "
- "delete_line | clipboard_paste | transpose_chars | "
- "undo | redo | move_beginning_of_line | move_end_of_line | "
- "move_previous_char | move_next_char | move_previous_word | "
- "move_next_word | history_previous | history_next | "
- "history_global_previous | history_global_next | "
- "jump_smart | jump_last_buffer | "
- "jump_previously_visited_buffer | "
- "jump_next_visited_buffer | hotlist_clear | grab_key | "
- "grab_key_command | scroll_unread | set_unread | "
- "set_unread_current_buffer | switch_active_buffer | "
- "switch_active_buffer_previous | insert [args]",
- N_("This command is used by key bindings or plugins."),
- "return|complete_next|complete_previous|search_next|"
+ N_("<action> [<arguments>]"),
+ N_("list of actions:\n"
+ " return: simulate key \"enter\"\n"
+ " complete_next: complete word with next completion\n"
+ " complete_previous: complete word with previous "
+ "completion\n"
+ " search_text: search text in buffer\n"
+ " delete_previous_char: delete previous char\n"
+ " delete_next_char: delete next char\n"
+ " delete_previous_word: delete previous word\n"
+ " delete_next_word: delete next word\n"
+ " delete_beginning_of_line: delete from beginning of "
+ "line until cursor\n"
+ " delete_end_of_line: delete from cursor until end of "
+ "line\n"
+ " delete_line: delete entire line\n"
+ " clipboard_paste: paste from clipboard\n"
+ " transpose_chars: transpose two chars\n"
+ " undo: undo last command line action\n"
+ " redo: redo last command line action\n"
+ " move_beginning_of_line: move cursor to beginning of "
+ "line\n"
+ " move_end_of_line: move cursor to end of line\n"
+ " move_previous_char: move cursor to previous char\n"
+ " move_next_char: move cursor to next char\n"
+ " move_previous_word: move cursor to previous word\n"
+ " move_next_word: move cursor to next word\n"
+ " history_previous: recall previous command in current "
+ "buffer history\n"
+ " history_next: recall next command in current buffer "
+ "history\n"
+ " history_global_previous: recall previous command in "
+ "global history\n"
+ " history_global_next: recall next command in global "
+ "history\n"
+ " jump_smart: jump to next buffer with activity\n"
+ " jump_last_buffer: jump to last buffer\n"
+ " jump_previously_visited_buffer: jump to previously "
+ "visited buffer\n"
+ " jump_next_visited_buffer: jump to next visited buffer\n"
+ " hotlist_clear: clear hotlist\n"
+ " grab_key: grab a key\n"
+ " grab_key_command: grab a key with its associated "
+ "command\n"
+ " scroll_unread: scroll to unread marker\n"
+ " set_unread: set unread marker for all buffers\n"
+ " set_unread_current_buffer: set unread marker for "
+ "current buffer\n"
+ " switch_active_buffer: switch to next merged buffer\n"
+ " switch_active_buffer_previous: switch to previous "
+ "merged buffer\n"
+ " insert: insert text in command line\n\n"
+ "This command is used by key bindings or plugins."),
+ "return|complete_next|complete_previous|search_text|"
"delete_previous_char|delete_next_char|"
"delete_previous_word|delete_next_word|"
"delete_beginning_of_line|delete_end_of_line|"
@@ -4681,9 +4781,12 @@ command_init ()
&command_input, NULL);
hook_command (NULL, "key",
N_("bind/unbind keys"),
- N_("[list | listdefault | listdiff] | [bind key [command "
- "[args]]] | [unbind key] | [reset key] | "
- "[resetall -yes] | [missing]"),
+ N_("list|listdefault|listdiff"
+ " || bind <key> [<command> [<args>]]"
+ " || unbind <key>"
+ " || reset <key>"
+ " || resetall -yes"
+ " || missing"),
N_(" list: list all current keys (without argument, "
"this list is displayed)\n"
"listdefault: list default keys\n"
@@ -4718,7 +4821,9 @@ command_init ()
&command_key, NULL);
hook_command (NULL, "layout",
N_("save/apply/reset layout for buffers and windows"),
- N_("[[save | apply | reset] [buffers | windows]]"),
+ N_("save [buffers|windows]"
+ " || apply [buffers|windows]"
+ " || reset [buffers|windows]"),
N_(" save: save current layout\n"
" apply: apply saved layout\n"
" reset: remove saved layout\n"
@@ -4730,7 +4835,7 @@ command_init ()
&command_layout, NULL);
hook_command (NULL, "mute",
N_("execute a command silently"),
- N_("[-current | -buffer name | -all] command"),
+ N_("[-current | -buffer <name> | -all] command"),
N_("-current: no output on curent buffer\n"
" -buffer: no output on specified buffer\n"
" name: full buffer name (examples: "
@@ -4752,15 +4857,18 @@ command_init ()
&command_mute, NULL);
hook_command (NULL, "plugin",
N_("list/load/unload plugins"),
- N_("[list [name]] | [listfull [name]] | [load filename] | "
- "[autoload] | [reload [name]] | [unload [name]]"),
+ N_("list|listfull [<name>]"
+ " || load <filename>"
+ " || autoload"
+ " || reload|unload [<name>]"),
N_(" list: list loaded plugins\n"
"listfull: list loaded plugins (verbose)\n"
" load: load a plugin\n"
"autoload: autoload plugins in system or user directory\n"
- " reload: reload one plugin (if no name given, unload "
+ " reload: reload a plugin (if no name given, unload "
"all plugins, then autoload plugins)\n"
- " unload: unload one or all plugins\n\n"
+ " unload: unload a plugin (if no name given, unload "
+ "all plugins)\n\n"
"Without argument, this command lists loaded plugins."),
"list %(plugins_names)"
" || listfull %(plugins_names)"
@@ -4771,22 +4879,24 @@ command_init ()
&command_plugin, NULL);
hook_command (NULL, "proxy",
N_("manage proxies"),
- N_("[add proxyname type address port [username "
- "[password]]] | [del proxyname|-all] | [set "
- "proxyname option value] | [list]"),
- N_(" add: add a new proxy\n"
- " proxyname: name of proxy (must be unique)\n"
- " type: http, socks4 or socks5\n"
- " address: IP or hostname\n"
- " port: port\n"
- " username: username (optional)\n"
- " password: password (optional)\n"
- " del: delete a proxy (or all proxies with -all)\n"
- " set: set a value for a proxy property\n"
- " option: option to change (for options list, look "
+ N_("list"
+ " || add <name> <type> <address> <port> [<username> "
+ "[<password>]]"
+ " || del <name>|-all"
+ " || set <name> <option> <value>"),
+ N_(" list: list all proxies\n"
+ " add: add a new proxy\n"
+ " name: name of proxy (must be unique)\n"
+ " type: http, socks4 or socks5\n"
+ " address: IP or hostname\n"
+ " port: port\n"
+ "username: username (optional)\n"
+ "password: password (optional)\n"
+ " del: delete a proxy (or all proxies with -all)\n"
+ " set: set a value for a proxy property\n"
+ " option: option to change (for options list, look "
"at /set weechat.proxy.<proxyname>.*)\n"
- " value: new value for option\n"
- " list: list all proxies\n\n"
+ " value: new value for option\n\n"
"Examples:\n"
" create a http proxy, running on local host, port 8888:\n"
" /proxy add local http 127.0.0.1 8888\n"
@@ -4797,14 +4907,14 @@ command_init ()
" /proxy add myproxy socks5 sample.host.org 3128 myuser mypass\n"
" delete a proxy:\n"
" /proxy del myproxy"),
- "add %(proxies_names) http|socks4|socks5"
+ "list"
+ " || add %(proxies_names) http|socks4|socks5"
" || del %(proxies_names)"
- " || set %(proxies_names) %(proxies_options)"
- " || list ",
+ " || set %(proxies_names) %(proxies_options)",
&command_proxy, NULL);
hook_command (NULL, "quit",
N_("quit WeeChat"),
- N_("[-yes] [arguments]"),
+ N_("[-yes] [<arguments>]"),
N_(" -yes: required if option weechat.look.confirm_quit "
"is enabled\n"
"arguments: text sent with signal \"quit\"\n"
@@ -4814,24 +4924,27 @@ command_init ()
&command_quit, NULL);
hook_command (NULL, "reload",
N_("reload configuration files from disk"),
- N_("[file [file...]]"),
- N_("file: configuration file to reload\n\n"
+ N_("[<file> [<file>...]]"),
+ N_("file: configuration file to reload (without extension "
+ "\".conf\")\n\n"
"Without argument, all files (WeeChat and plugins) are "
"reloaded."),
"%(config_files)|%*",
&command_reload, NULL);
hook_command (NULL, "save",
N_("save configuration files to disk"),
- N_("[file [file...]]"),
- N_("file: configuration file to save\n\n"
+ N_("[<file> [<file>...]]"),
+ N_("file: configuration file to save (without extension "
+ "\".conf\")\n\n"
"Without argument, all files (WeeChat and plugins) are "
"saved."),
"%(config_files)|%*",
&command_save, NULL);
hook_command (NULL, "set",
N_("set config options"),
- N_("[option [value]]"),
- N_("option: name of an option\n"
+ N_("[<option> [<value>]]"),
+ N_("option: name of an option (can start or end with \"*\" "
+ "to list many options)\n"
" value: new value for option\n\n"
"New value can be, according to variable type:\n"
" boolean: on, off or toggle\n"
@@ -4840,21 +4953,31 @@ command_init ()
" color : color name, ++number or --number\n\n"
"For all types, you can use null to remove "
"option value (undefined value). This works only "
- "for some special plugin variables."),
+ "for some special plugin variables.\n\n"
+ "Examples:\n"
+ " display options about highlight:\n"
+ " /set *highlight*\n"
+ " add a word to highlight:\n"
+ " /set weechat.look.highlight \"word\""),
"%(config_options) %(config_option_values)",
&command_set, NULL);
hook_command (NULL, "unset",
N_("unset/reset config options"),
- N_("[option]"),
+ N_("<option>"),
N_("option: name of an option (may begin or end with \"*\" "
"to mass-reset options, use carefully!)\n\n"
"According to option, it's reset (for standard options) "
- "or removed (for optional settings, like server values)."),
+ "or removed (for optional settings, like server values).\n\n"
+ "Examples:\n"
+ " reset one option:\n"
+ " /unset weechat.look.item_time_format\n"
+ " reset all color options:\n"
+ " /unset weechat.color.*"),
"%(config_options)",
&command_unset, NULL);
hook_command (NULL, "upgrade",
N_("upgrade WeeChat without disconnecting from servers"),
- N_("[path_to_binary]"),
+ N_("[<path_to_binary>]"),
N_("path_to_binary: path to WeeChat binary (default is "
"current binary)\n\n"
"This command run again a WeeChat binary, so it should "
@@ -4863,9 +4986,10 @@ command_init ()
"Upgrade process has 4 steps:\n"
" 1. save session into files for core and plugins "
"(buffers, history, ..)\n"
- " 2. unload all plugins (configs *.conf are saved)\n"
- " 3. save WeeChat config (weechat.conf)\n"
- " 4. exec new WeeChat binary."),
+ " 2. unload all plugins (configuration files (*.conf) "
+ "are written on disk)\n"
+ " 3. save WeeChat configuration (weechat.conf)\n"
+ " 4. execute new WeeChat binary and reload session."),
"%(filename)",
&command_upgrade, NULL);
hook_command (NULL, "uptime",
@@ -4888,7 +5012,7 @@ command_init ()
&command_version, NULL);
hook_command (NULL, "wait",
N_("schedule a command execution in future"),
- N_("number[unit] command"),
+ N_("<number>[<unit>] <command>"),
N_(" number: amount of time to wait (integer number)\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
@@ -4902,22 +5026,27 @@ command_init ()
"been closed before execution of command), then command "
"is executed on WeeChat core buffer).\n\n"
"Examples:\n"
- " join channel in 10 sec:\n"
+ " join channel in 10 seconds:\n"
" /wait 10 /join #test\n"
- " set away in 15 min:\n"
+ " set away in 15 minutes:\n"
" /wait 15m /away -all I'm away\n"
- " say 'hello' in 2 min:\n"
+ " say 'hello' in 2 minutes:\n"
" /wait 2m hello"),
"%- %(commands)",
&command_wait, NULL);
hook_command (NULL, "window",
N_("manage windows"),
- N_("[list | -1 | +1 | b# | up | down | left | right | "
- "splith [pct] | splitv [pct] | resize pct | "
- "merge [all] | page_up | page_down | refresh | scroll | "
- "scroll_up | scroll_down | scroll_top | scroll_bottom | "
- "scroll_previous_highlight | scroll_next_highlight | "
- "zoom]"),
+ N_("list"
+ " || -1|+1|b#|up|down|left|right"
+ " || splith|splitv [<pct>]"
+ " || resize <pct>"
+ " || merge [all]"
+ " || page_up|page_down"
+ " || refresh"
+ " || scroll|scroll_up|scroll_down|scroll_top|"
+ "scroll_bottom|scroll_previous_highlight|"
+ "scroll_next_highlight"
+ " || zoom"),
N_(" list: list opened windows (without argument, "
"this list is displayed)\n"
" -1: jump to previous window\n"
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index 7d347c9c6..630131762 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -959,12 +959,12 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_command ("alias",
N_("create an alias for a command"),
- N_("[[-completion completion] alias_name [command "
- "[arguments]]]"),
+ N_("[-completion <completion>] <alias> [<command> "
+ "[<arguments>]]"),
N_("completion: completion for alias (optional, by "
"default completion is done with target "
"command)\n"
- "alias_name: name of alias (can start or end "
+ " alias: name of alias (can start or end "
"with \"*\" for alias listing)\n"
" command: command name (many commands can be "
"separated by semicolons)\n"
@@ -997,8 +997,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
&alias_command_cb, NULL);
weechat_hook_command ("unalias", N_("remove aliases"),
- N_("alias_name [alias_name...]"),
- N_("alias_name: name of alias to remove"),
+ N_("<alias> [<alias>...]"),
+ N_("alias: name of alias to remove"),
"%(alias)|%*",
&unalias_command_cb, NULL);
diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c
index 698657293..86cf99c1d 100644
--- a/src/plugins/aspell/weechat-aspell.c
+++ b/src/plugins/aspell/weechat-aspell.c
@@ -965,8 +965,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
/* command /aspell */
weechat_hook_command ("aspell",
N_("aspell plugin configuration"),
- N_("dictlist | enable lang | disable | "
- "addword [lang] word"),
+ N_("dictlist"
+ " || enable <lang>"
+ " || disable"
+ " || addword [<lang>] <word>"),
N_("dictlist: show installed dictionaries\n"
" enable: enable aspell on current buffer\n"
" disable: disable aspell on current buffer\n"
diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c
index fdb08b0e5..264a5bf87 100644
--- a/src/plugins/charset/charset.c
+++ b/src/plugins/charset/charset.c
@@ -531,7 +531,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
/* /charset command */
weechat_hook_command ("charset",
N_("change charset for current buffer"),
- N_("[[decode | encode] charset] | [reset]"),
+ N_("decode|encode <charset>"
+ " || reset"),
N_(" decode: change decoding charset\n"
" encode: change encoding charset\n"
"charset: new charset for current buffer\n"
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c
index e65df9b63..86ba71082 100644
--- a/src/plugins/demo/demo.c
+++ b/src/plugins/demo/demo.c
@@ -153,25 +153,6 @@ demo_buffer_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
}
/*
- * demo_buffer_set_command_cb: demo command for setting buffer property
- */
-
-int
-demo_buffer_set_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
- char **argv, char **argv_eol)
-{
- /* make C compiler happy */
- (void) data;
-
- if (argc > 2)
- {
- weechat_buffer_set (buffer, argv[1], argv_eol[2]);
- }
-
- return WEECHAT_RC_OK;
-}
-
-/*
* demo_infolist_print: display an infolist
*/
@@ -390,28 +371,21 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_command ("demo_printf",
N_("print some messages on current buffer"),
- N_("[text]"),
+ N_("<text>"),
N_("text: write this text"),
"",
&demo_printf_command_cb, NULL);
weechat_hook_command ("demo_buffer",
N_("open a new buffer"),
- N_("name"),
+ N_("<name>"),
"",
"",
&demo_buffer_command_cb, NULL);
- weechat_hook_command ("demo_buffer_set",
- N_("set a buffer property"),
- N_("property value"),
- "",
- "",
- &demo_buffer_set_command_cb, NULL);
-
weechat_hook_command ("demo_info",
N_("get and display an info"),
- N_("[info [arguments]]"),
+ N_("<info> [<arguments>]"),
N_(" info: info to display\n"
"arguments: optional arguments for info\n\n"
"Without argument, this command displays list "
@@ -421,7 +395,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_command ("demo_infolist",
N_("get and display an infolist"),
- N_("[infolist [arguments]]"),
+ N_("<infolist> [<arguments>]"),
N_(" infolist: infolist to display\n"
"arguments: optional arguments for infolist\n\n"
"Without argument, this command displays list "
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 315a3ecfc..d4018de8d 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -4606,14 +4606,14 @@ irc_command_init ()
weechat_hook_command ("admin",
N_("find information about the administrator of the "
"server"),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: server"),
NULL, &irc_command_admin, NULL);
weechat_hook_command ("allchan",
N_("execute a command on all channels of all "
"connected servers"),
- N_("[-current] [-exclude=channel[,channel...]] "
- "command [arguments]"),
+ N_("[-current] [-exclude=<channel>[,<channel>...]] "
+ "<command> [<arguments>]"),
N_(" -current: execute command for channels of "
"current server only\n"
" -exclude: exclude some channels ('*' is "
@@ -4632,8 +4632,8 @@ irc_command_init ()
NULL, &irc_command_allchan, NULL);
weechat_hook_command ("allserv",
N_("execute a command on all connected servers"),
- N_("[-exclude=server[,server...]] "
- "command [arguments]"),
+ N_("[-exclude=<server>[,<server>...]] "
+ "<command> [<arguments>]"),
N_(" -exclude: exclude some servers ('*' is "
"allowed at beginning or end of server name, to "
"exclude many servers)\n"
@@ -4648,16 +4648,17 @@ irc_command_init ()
weechat_hook_command_run ("/away", &irc_command_run_away, NULL);
weechat_hook_command ("ban",
N_("ban nicks or hosts"),
- N_("[channel] [nickname [nickname ...]]"),
- N_(" channel: channel for ban\n"
- "nickname: user or host to ban"),
+ N_("[<channel>] [<nick> [<nick>...]]"),
+ N_("channel: channel for ban\n"
+ " nick: user or host to ban"),
"%(irc_channel_nicks_hosts)", &irc_command_ban, NULL);
weechat_hook_command ("connect",
N_("connect to IRC server(s)"),
- N_("[servername [servername ...] | hostname[/port] "
- "[-option[=value]] [-nooption] | -all | -open] "
- "[-nojoin] [-switch]"),
- N_("servername: internal server name to connect "
+ N_("[<server> [<server>...] | <hostname>[/<port>]] "
+ "[-<option>[=<value>]] [-no<option>] [-nojoin] "
+ "[-switch]"
+ " || -all|-open [-nojoin] [-switch]"),
+ N_(" server: internal server name to connect "
"(server must have been created by /server add)\n"
" hostname: hostname (or IP) of a server (this "
"will create a TEMPORARY server)\n"
@@ -4684,7 +4685,7 @@ irc_command_init ()
&irc_command_connect, NULL);
weechat_hook_command ("ctcp",
N_("send a CTCP message (Client-To-Client Protocol)"),
- N_("target type [arguments]"),
+ N_("<target> <type> [<arguments>]"),
N_(" target: nick or channel to send CTCP to\n"
" type: CTCP type (examples: \"version\", "
"\"ping\", ..)\n"
@@ -4695,17 +4696,17 @@ irc_command_init ()
&irc_command_ctcp, NULL);
weechat_hook_command ("cycle",
N_("leave and rejoin a channel"),
- N_("[channel[,channel]] [part_message]"),
- N_(" channel: channel name for cycle\n"
- "part_message: part message (displayed to other "
+ N_("[<channel>[,<channel>...]] [<message>]"),
+ N_("channel: channel name for cycle\n"
+ "message: part message (displayed to other "
"users)"),
"%(irc_msg_part)", &irc_command_cycle, NULL);
weechat_hook_command ("dcc",
- N_("start DCC (file or chat)"),
- N_("action [nickname [file]]"),
- N_(" action: 'send' (file) or 'chat'\n"
- "nickname: nickname to send file or chat\n"
- " file: filename (on local host)\n\n"
+ N_("start a DCC (file transfert or direct chat)"),
+ N_("chat <nick>"
+ " || send <nick> <file>"),
+ N_("nick: nick for chat or file\n"
+ "file: filename (on local host)\n\n"
"Examples:\n"
" chat with nick \"toto\":\n"
" /dcc chat toto\n"
@@ -4716,19 +4717,19 @@ irc_command_init ()
&irc_command_dcc, NULL);
weechat_hook_command ("dehalfop",
N_("remove half channel operator status from "
- "nickname(s)"),
- N_("[nickname [nickname]]"),
+ "nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)", &irc_command_dehalfop, NULL);
weechat_hook_command ("deop",
N_("remove channel operator status from "
- "nickname(s)"),
- N_("[nickname [nickname]]"),
+ "nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)|%*", &irc_command_deop, NULL);
weechat_hook_command ("devoice",
- N_("remove voice from nickname(s)"),
- N_("[nickname [nickname]]"),
+ N_("remove voice from nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)|%*", &irc_command_devoice, NULL);
weechat_hook_command ("die",
@@ -4738,24 +4739,28 @@ irc_command_init ()
NULL, &irc_command_die, NULL);
weechat_hook_command ("disconnect",
N_("disconnect from IRC server(s)"),
- N_("[-all | servername [servername ...]]"),
- N_(" -all: disconnect from all servers\n"
- "servername: server name to disconnect"),
+ N_("<server> [<server>...]"
+ " || -all"),
+ N_("server: server name to disconnect\n"
+ " -all: disconnect from all servers"),
"-all"
" || %(irc_servers)|%*",
&irc_command_disconnect, NULL);
weechat_hook_command ("halfop",
N_("give half channel operator status to "
- "nickname(s)"),
- N_("[nickname [nickname]]"),
+ "nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)", &irc_command_halfop, NULL);
weechat_hook_command ("ignore",
N_("ignore nicks/hosts from servers or channels"),
- N_("[list] | [add [re:]nick/host [server [channel]]] | "
- "[del number|-all]"),
+ N_("list"
+ " || add [re:]<nick> [<server> [<channel>]]"
+ " || del <number>|-all"),
N_(" list: list all ignores\n"
" add: add an ignore\n"
+ " nick: nick or hostname (can be regular "
+ "expression if \"re:\" is given)\n"
" del: delete an ignore\n"
" number: number of ignore to delete (look at "
"list to find it)\n"
@@ -4780,23 +4785,24 @@ irc_command_init ()
&irc_command_ignore, NULL);
weechat_hook_command ("info",
N_("get information describing the server"),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: server name"),
NULL, &irc_command_info, NULL);
weechat_hook_command ("invite",
N_("invite a nick on a channel"),
- N_("nickname channel"),
- N_("nickname: nick to invite\n"
- " channel: channel to invite"),
+ N_("<nick> <channel>"),
+ N_(" nick: nick to invite\n"
+ "channel: channel to invite"),
"%(nicks) %(irc_server_channels)", &irc_command_invite, NULL);
weechat_hook_command ("ison",
- N_("check if a nickname is currently on IRC"),
- N_("nickname [nickname ...]"),
- N_("nickname: nickname"),
+ N_("check if a nick is currently on IRC"),
+ N_("<nick> [<nick>...]"),
+ N_("nick: nick"),
"%(nicks)|%*", &irc_command_ison, NULL);
weechat_hook_command ("join",
N_("join a channel"),
- N_("[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"),
+ N_("[-server <server>] [<channel1>[,<channel2>...]] "
+ "[<key1>[,<key2>...]]"),
N_(" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with "
@@ -4809,17 +4815,17 @@ irc_command_init ()
" || %(irc_channels)", &irc_command_join, NULL);
weechat_hook_command ("kick",
N_("forcibly remove a user from a channel"),
- N_("[channel] nickname [comment]"),
- N_(" channel: channel where user is\n"
- "nickname: nickname to kick\n"
- " comment: comment for kick"),
+ N_("[<channel>] <nick> [<reason>]"),
+ N_("channel: channel where user is\n"
+ " nick: nick to kick\n"
+ " reason: reason for kick"),
"%(nicks) %-", &irc_command_kick, NULL);
weechat_hook_command ("kickban",
N_("kicks and bans a nick from a channel"),
- N_("[channel] nickname [comment]"),
- N_(" channel: channel where user is\n"
- "nickname: nickname to kick and ban\n"
- " comment: comment for kick\n\n"
+ N_("[<channel>] <nick> [<reason>]"),
+ N_("channel: channel where user is\n"
+ " nick: nick to kick and ban\n"
+ " reason: reason for kick\n\n"
"It is possible to kick/ban with a mask, nick "
"will be extracted from mask and replaced by "
"\"*\".\n\n"
@@ -4829,14 +4835,14 @@ irc_command_init ()
"%(irc_channel_nicks_hosts) %-", &irc_command_kickban, NULL);
weechat_hook_command ("kill",
N_("close client-server connection"),
- N_("nickname comment"),
- N_("nickname: nickname\n"
- " comment: comment for kill"),
+ N_("<nick> <reason>"),
+ N_(" nick: nick to kill\n"
+ "reason: reason for kill"),
"%(nicks) %-", &irc_command_kill, NULL);
weechat_hook_command ("links",
N_("list all servernames which are known by the "
"server answering the query"),
- N_("[[server] server_mask]"),
+ N_("[[<server>>] <server_mask>]"),
N_(" server: this server should answer the "
"query\n"
"server_mask: list of servers must match this "
@@ -4844,10 +4850,11 @@ irc_command_init ()
NULL, &irc_command_links, NULL);
weechat_hook_command ("list",
N_("list channels and their topic"),
- N_("[channel[,channel] [server] [-re regexp]]"),
+ N_("[<channel>[,<channel>...]] [<server>] "
+ "[-re <regex>]"),
N_("channel: channel to list\n"
" server: server name\n"
- " regexp: regular expression used to filter "
+ " regex: regular expression used to filter "
"results\n\n"
"Examples:\n"
" list all channels on server (can be very slow "
@@ -4862,7 +4869,7 @@ irc_command_init ()
weechat_hook_command ("lusers",
N_("get statistics about the size of the IRC "
"network"),
- N_("[mask [target]]"),
+ N_("[<mask> [<target>]]"),
N_(" mask: servers matching the mask only\n"
"target: server for forwarding request"),
NULL, &irc_command_lusers, NULL);
@@ -4873,14 +4880,13 @@ irc_command_init ()
NULL, &irc_command_map, NULL);
weechat_hook_command ("me",
N_("send a CTCP action to the current channel"),
- N_("message"),
+ N_("<message>"),
N_("message: message to send"),
NULL, &irc_command_me, NULL);
weechat_hook_command ("mode",
N_("change channel or user mode"),
- N_("{ [channel] {[+|-]|o|p|s|i|t|n|b|v} [limit] "
- "[user] [ban mask] } | { nickname "
- "{[+|-]|i|w|s|o} }"),
+ N_("[<channel>] [+|-]o|p|s|i|t|n|b|v [<arguments>]"
+ " || <nick> [+|-]i|w|s|o"),
N_("channel modes:\n"
" channel: channel name to modify (default is "
"current one)\n"
@@ -4900,20 +4906,28 @@ irc_command_init ()
"moderated channel\n"
" k: set a channel key (password)\n"
"user modes:\n"
- " nickname: nickname to modify\n"
+ " nick: nick to modify\n"
" i: mark a user as invisible\n"
" s: mark a user for receive server notices\n"
" w: user receives wallops\n"
- " o: operator flag"),
+ " o: operator flag\n\n"
+ "List of modes is not comprehensive, you should "
+ "read documentation about your server to see all "
+ "possible modes.\n\n"
+ "Examples:\n"
+ " protect topic on channel #weechat:\n"
+ " /mode #weecht +t\n"
+ " become invisible on server:\n"
+ " /mode nick +i"),
"%(irc_channel)|%(irc_server_nick)", &irc_command_mode, NULL);
weechat_hook_command ("motd",
N_("get the \"Message Of The Day\""),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: server name"),
NULL, &irc_command_motd, NULL);
weechat_hook_command ("msg",
N_("send message to a nick or channel"),
- N_("[-server server] target[,target] text"),
+ N_("[-server <server>] <target>[,<target>...] <text>"),
N_("server: send to this server (internal name)\n"
"target: nick or channel (may be mask, '*' = "
"current channel)\n"
@@ -4922,22 +4936,22 @@ irc_command_init ()
" || %(nicks) %-",
&irc_command_msg, NULL);
weechat_hook_command ("names",
- N_("list nicknames on channels"),
- N_("[channel[,channel]]"),
+ N_("list nicks on channels"),
+ N_("[<channel>[,<channel>...]]"),
N_("channel: channel name"),
"%(irc_channels)", &irc_command_names, NULL);
weechat_hook_command ("nick",
- N_("change current nickname"),
- N_("[-all] nickname"),
- N_(" -all: set new nickname for all connected "
+ N_("change current nick"),
+ N_("[-all] <nick>"),
+ N_("-all: set new nick for all connected "
"servers\n"
- "nickname: new nickname"),
+ "nick: new nick"),
"-all %(irc_server_nick)"
" || %(irc_server_nick)",
&irc_command_nick, NULL);
weechat_hook_command ("notice",
N_("send notice message to user"),
- N_("[-server server] target text"),
+ N_("[-server <server>] <target> <text>"),
N_("server: send to this server (internal name)\n"
"target: nick or channel\n"
" text: text to send"),
@@ -4945,10 +4959,10 @@ irc_command_init ()
weechat_hook_command ("notify",
N_("add a notification for presence or away status "
"of nicks on servers"),
- N_("[add nick [server [-away]]] | "
- "[del nick|-all [server]]"),
+ N_("add <nick> [<server> [-away]]"
+ " || del <nick>|-all [<server>]"),
N_(" add: add a notification\n"
- " nick: nickname\n"
+ " nick: nick\n"
"server: internal server name (by default "
"current server)\n"
" -away: notify when away message is changed "
@@ -4974,63 +4988,63 @@ irc_command_init ()
" || del -all|%(irc_notify_nicks) %(irc_servers) %-",
&irc_command_notify, NULL);
weechat_hook_command ("op",
- N_("give channel operator status to nickname(s)"),
- N_("nickname [nickname]"),
+ N_("give channel operator status to nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)|%*", &irc_command_op, NULL);
weechat_hook_command ("oper",
N_("get operator privileges"),
- N_("user password"),
- N_("user/password: used to get privileges on "
- "current IRC server"),
+ N_("<user> <password>"),
+ N_(" user: user\n"
+ "password: password"),
NULL, &irc_command_oper, NULL);
weechat_hook_command ("part",
N_("leave a channel"),
- N_("[channel[,channel]] [part_message]"),
- N_(" channel: channel name to leave\n"
- "part_message: part message (displayed to other "
+ N_("[<channel>[,<channel>...]] [<message>]"),
+ N_("channel: channel name to leave\n"
+ "message: part message (displayed to other "
"users)"),
"%(irc_msg_part)", &irc_command_part, NULL);
weechat_hook_command ("ping",
N_("ping server"),
- N_("server1 [server2]"),
+ N_("<server1> [<server2>]"),
N_("server1: server to ping\n"
"server2: forward ping to this server"),
NULL, &irc_command_ping, NULL);
weechat_hook_command ("pong",
N_("answer to a ping message"),
- N_("daemon [daemon2]"),
+ N_("<daemon> [<daemon2>]"),
N_(" daemon: daemon who has responded to Ping "
"message\n"
"daemon2: forward message to this daemon"),
NULL, &irc_command_pong, NULL);
weechat_hook_command ("query",
N_("send a private message to a nick"),
- N_("[-server server] nickname [text]"),
- N_(" server: send to this server (internal name)\n"
- "nickname: nickname for private conversation\n"
- " text: text to send"),
+ N_("[-server <server>] <nick> [<text>]"),
+ N_("server: send to this server (internal name)\n"
+ " nick: nick for private conversation\n"
+ " text: text to send"),
"%(nicks)|-server %(irc_servers) %-", &irc_command_query, NULL);
weechat_hook_command ("quote",
N_("send raw data to server without parsing"),
- N_("[-server server] data"),
+ N_("[-server <server>] <data>"),
N_("server: send to this server (internal name)\n"
" data: raw data to send"),
"-server %(irc_servers)", &irc_command_quote, NULL);
weechat_hook_command ("reconnect",
N_("reconnect to server(s)"),
- N_("[servername [servername ...] | -all] [-nojoin] "
- "[-switch]"),
- N_("servername: server name to reconnect\n"
- " -all: reconnect to all servers\n"
- " -nojoin: do not join any channel (even if "
+ N_("<server> [<server>...] [-nojoin] [-switch]"
+ " || -all [-nojoin] [-switch]"),
+ N_(" server: server name to reconnect\n"
+ " -all: reconnect to all servers\n"
+ "-nojoin: do not join any channel (even if "
"autojoin is enabled on server)\n"
- " -switch: switch to next server address"),
+ "-switch: switch to next server address"),
"%(irc_servers)|-all|-nojoin|-switch|%*",
&irc_command_reconnect, NULL);
weechat_hook_command ("rehash",
N_("tell the server to reload its config file"),
- N_("[option]"),
+ N_("[<option>]"),
N_("option: extra option, for some servers"),
NULL, &irc_command_rehash, NULL);
weechat_hook_command ("restart",
@@ -5040,78 +5054,75 @@ irc_command_init ()
NULL, &irc_command_restart, NULL);
weechat_hook_command ("sajoin",
N_("forces a user to join channel(s)"),
- N_("nickname channel[,channel]"),
- N_("nickname: nickname\n"
- " channel: channel name"),
+ N_("<nick> <channel>[,<channel>...]"),
+ N_(" nick: nick\n"
+ "channel: channel name"),
"%(nicks) %(irc_server_channels)", &irc_command_sajoin, NULL);
weechat_hook_command ("samode",
N_("change mode on channel, without having operator "
"status"),
- /* TRANSLATORS: "channel" and "mode" are arguments
- for command, translate them separately */
- N_("channel mode"),
+ N_("<channel> <mode>"),
N_("channel: channel name\n"
" mode: mode for channel"),
"%(irc_server_channels)", &irc_command_samode, NULL);
weechat_hook_command ("sanick",
N_("forces a user to use another nick"),
- N_("nickname new_nickname"),
- N_(" nickname: nickname\n"
- "new_nickname: new nickname"),
+ N_("<nick> <new_nick>"),
+ N_(" nick: nick\n"
+ "new_nick: new nick"),
"%(nicks) %(nicks)", &irc_command_sanick, NULL);
weechat_hook_command ("sapart",
N_("forces a user to leave channel(s)"),
- N_("nickname channel[,channel]"),
- N_("nickname: nickname\n"
- " channel: channel name"),
+ N_("<nick> <channel>[,<channel>...]"),
+ N_(" nick: nick\n"
+ "channel: channel name"),
"%(nicks) %(irc_server_channels)", &irc_command_sapart, NULL);
weechat_hook_command ("saquit",
N_("forces a user to quit server with a reason"),
- N_("nickname reason"),
- N_("nickname: nickname\n"
- " reason: reason"),
+ N_("<nick> <reason>"),
+ N_(" nick: nick\n"
+ "reason: reason"),
"%(nicks)", &irc_command_saquit, NULL);
weechat_hook_command ("service",
N_("register a new service"),
- N_("nickname reserved distribution type reserved "
- "info"),
+ N_("<nick> <reserved> <distribution> <type> "
+ "<reserved> <info>"),
N_("distribution: visibility of service\n"
" type: reserved for future usage"),
NULL, &irc_command_service, NULL);
weechat_hook_command ("server",
N_("list, add or remove IRC servers"),
- N_("[list [servername]] | [listfull [servername]] | "
- "[add servername hostname[/port] [-temp] "
- "[-option[=value]] [-nooption]] | "
- "[copy servername newservername] | "
- "[rename servername newservername] | "
- "[keep servername] | [del servername] | "
- "[deloutq] | [jump] | [raw]"),
- N_(" list: list servers (without argument, "
+ N_("list|listfull [<server>]"
+ " || add <server> <hostname>[/<port>] [-temp] "
+ "[-<option>[=<value>]] [-no<option>]"
+ " || copy|rename <server> <new_name>"
+ " || del|keep <server>"
+ " || deloutq|jump|raw"),
+ N_(" list: list servers (without argument, "
"this list is displayed)\n"
- " listfull: list servers with detailed info for "
+ "listfull: list servers with detailed info for "
"each server\n"
- " add: create a new server\n"
- "servername: server name, for internal and "
+ " add: create a new server\n"
+ " server: server name, for internal and "
"display use\n"
- " hostname: name or IP address of server, with "
+ "hostname: name or IP address of server, with "
"optional port (default: 6667), many addresses can "
"be separated by a comma\n"
- " temp: create temporary server (not saved)\n"
- " option: set option for server (for boolean "
+ " temp: create temporary server (not saved)\n"
+ " option: set option for server (for boolean "
"option, value can be omitted)\n"
- " nooption: set boolean option to 'off' (for "
+ "nooption: set boolean option to 'off' (for "
"example: -nossl)\n"
- " copy: duplicate a server\n"
- " rename: rename a server\n"
- " keep: keep server in config file (for "
+ " copy: duplicate a server\n"
+ " rename: rename a server\n"
+ " keep: keep server in config file (for "
"temporary servers only)\n"
- " del: delete a server\n"
- " deloutq: delete messages out queue for all "
+ " del: delete a server\n"
+ " deloutq: delete messages out queue for all "
"servers (all messages WeeChat is currently "
"sending)\n"
- " jump: jump to server buffer\n"
- " raw: open buffer with raw IRC data\n\n"
+ " jump: jump to server buffer\n"
+ " raw: open buffer with raw IRC data\n\n"
"Examples:\n"
" /server listfull\n"
" /server add oftc irc.oftc.net/6697 -ssl -autoconnect\n"
@@ -5123,39 +5134,39 @@ irc_command_init ()
" /server rename oftc newoftc\n"
" /server del freenode\n"
" /server deloutq"),
- "add %(irc_servers)"
+ "list %(irc_servers)"
+ " || listfull %(irc_servers)"
+ " || add %(irc_servers)"
" || copy %(irc_servers) %(irc_servers)"
" || rename %(irc_servers) %(irc_servers)"
" || keep %(irc_servers)"
" || del %(irc_servers)"
" || deloutq"
" || jump"
- " || list %(irc_servers)"
- " || listfull %(irc_servers)"
" || raw",
&irc_command_server, NULL);
weechat_hook_command ("servlist",
N_("list services currently connected to the "
"network"),
- N_("[mask [type]]"),
+ N_("[<mask> [<type>]]"),
N_("mask: list only services matching this mask\n"
"type: list only services of this type"),
NULL, &irc_command_servlist, NULL);
weechat_hook_command ("squery",
N_("deliver a message to a service"),
- N_("service text"),
+ N_("<service> <text>"),
N_("service: name of service\n"
- "text: text to send"),
+ " text: text to send"),
NULL, &irc_command_squery, NULL);
weechat_hook_command ("squit",
N_("disconnect server links"),
- N_("server comment"),
- N_( "server: server name\n"
+ N_("<server> <comment>"),
+ N_( " server: server name\n"
"comment: comment for quit"),
NULL, &irc_command_squit, NULL);
weechat_hook_command ("stats",
N_("query statistics about server"),
- N_("[query [server]]"),
+ N_("[<query> [<server>]]"),
N_(" query: c/h/i/k/l/m/o/y/u (see RFC1459)\n"
"server: server name"),
NULL, &irc_command_stats, NULL);
@@ -5163,91 +5174,89 @@ irc_command_init ()
N_("give users who are on a host running an IRC "
"server a message asking them to please join "
"IRC"),
- N_("user [target [channel]]"),
+ N_("<user> [<target> [<channel>]]"),
N_(" user: username\n"
- "target: server name\n"
+ " target: server name\n"
"channel: channel name"),
NULL, &irc_command_summon, NULL);
weechat_hook_command ("time",
N_("query local time from server"),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: query time from specified server"),
NULL, &irc_command_time, NULL);
weechat_hook_command ("topic",
N_("get/set channel topic"),
- N_("[channel] [topic]"),
+ N_("[<channel>] [<topic>|-delete]"),
N_("channel: channel name\n"
- "topic: new topic for "
- "channel (if topic is \"-delete\" then topic "
- "is deleted)"),
+ " topic: new topic for channel\n"
+ "-delete: delete channel topic"),
"%(irc_channel_topic)|-delete %-", &irc_command_topic, NULL);
weechat_hook_command ("trace",
N_("find the route to specific server"),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: server"),
NULL, &irc_command_trace, NULL);
weechat_hook_command ("unban",
N_("unban nicks or hosts"),
- N_("[channel] nickname [nickname ...]"),
- N_(" channel: channel for unban\n"
- "nickname: user or host to unban"),
+ N_("[<channel>] <nick> [<nick>...]"),
+ N_("channel: channel for unban\n"
+ " nick: user or host to unban"),
NULL, &irc_command_unban, NULL);
weechat_hook_command ("userhost",
- N_("return a list of information about nicknames"),
- N_("nickname [nickname ...]"),
- N_("nickname: nickname"),
+ N_("return a list of information about nicks"),
+ N_("<nick> [<nick>...]"),
+ N_("nick: nick"),
"%(nicks)", &irc_command_userhost, NULL);
weechat_hook_command ("users",
N_("list of users logged into the server"),
- N_("[target]"),
+ N_("[<target>]"),
N_("target: server"),
NULL, &irc_command_users, NULL);
weechat_hook_command ("version",
N_("give the version info of nick or server "
"(current or specified)"),
- N_("[server | nickname]"),
- N_(" server: server name\n"
- "nickname: nickname"),
+ N_("[<server>|<nick>]"),
+ N_("server: server name\n"
+ " nick: nick"),
"%(nicks)", &irc_command_version, NULL);
weechat_hook_command ("voice",
- N_("give voice to nickname(s)"),
- N_("[nickname [nickname]]"),
+ N_("give voice to nick(s)"),
+ N_("<nick> [<nick>...]"),
"",
"%(nicks)|%*", &irc_command_voice, NULL);
weechat_hook_command ("wallchops",
N_("send a notice to channel ops"),
- N_("[channel] text"),
+ N_("[<channel>] <text>"),
N_("channel: channel name\n"
" text: text to send"),
NULL, &irc_command_wallchops, NULL);
weechat_hook_command ("wallops",
N_("send a message to all currently connected users "
"who have set the 'w' user mode for themselves"),
- N_("text"),
- N_("text to send"),
+ N_("<text>"),
+ N_("text: text to send"),
NULL, &irc_command_wallops, NULL);
weechat_hook_command ("who",
N_("generate a query which returns a list of "
"information"),
- N_("[mask [\"o\"]]"),
+ N_("[<mask> [o]]"),
N_("mask: only information which match this mask\n"
" o: only operators are returned according to "
"the mask supplied"),
"%(irc_channels)", &irc_command_who, NULL);
weechat_hook_command ("whois",
N_("query information about user(s)"),
- N_("[server] nickname[,nickname]"),
- N_(" server: server name\n"
- "nickname: nickname (may be a mask)"),
+ N_("[<server>] <nick>[,<nick>...]"),
+ N_("server: server name\n"
+ " nick: nick (may be a mask)"),
"%(nicks)", &irc_command_whois, NULL);
weechat_hook_command ("whowas",
- N_("ask for information about a nickname which no "
+ N_("ask for information about a nick which no "
"longer exists"),
- N_("nickname [,nickname [,nickname ...]] [count "
- "[target]]"),
- N_("nickname: nickname to search\n"
- " count: number of replies to return "
+ N_("<nick>[,<nick>...] [<count> [<target>]]"),
+ N_(" nick: nick to search\n"
+ " count: number of replies to return "
"(full search if negative number)\n"
- " target: reply should match this mask"),
+ "target: reply should match this mask"),
"%(nicks)", &irc_command_whowas, NULL);
}
diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c
index f483a18a6..10463a63a 100644
--- a/src/plugins/logger/logger.c
+++ b/src/plugins/logger/logger.c
@@ -1214,7 +1214,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
/* command /logger */
weechat_hook_command ("logger",
N_("logger plugin configuration"),
- N_("[list | set level | disable]"),
+ N_("list"
+ " || set <level>"
+ " || disable"),
N_(" list: show logging status for opened buffers\n"
" set: set logging level on current buffer\n"
" level: level for messages to be logged (0 = "
diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c
index 46fc2f3ed..146e31ac5 100644
--- a/src/plugins/relay/relay-command.c
+++ b/src/plugins/relay/relay-command.c
@@ -284,8 +284,10 @@ relay_command_init ()
{
weechat_hook_command ("relay",
N_("relay control"),
- N_("[list | listfull | add protocol.name port | "
- "del protocol.name | raw]"),
+ N_("list|listfull|listrelay"
+ " || add <protocol.name> <port>"
+ " || del <protocol.name>"
+ " || raw"),
N_(" list: list relay clients (only active "
"relays)\n"
" listfull: list relay clients (verbose, all "
diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c
index 6e720673c..564643768 100644
--- a/src/plugins/rmodifier/rmodifier-command.c
+++ b/src/plugins/rmodifier/rmodifier-command.c
@@ -234,9 +234,10 @@ rmodifier_command_init ()
{
weechat_hook_command ("rmodifier",
N_("alter modifier strings with regular expressions"),
- N_("[list] | [listdefault] | "
- "[add name modifiers groups regex] | "
- "[del name|-all [name...]] | [default -yes]"),
+ N_("list|listdefault"
+ " || add <name> <modifiers> <groups> <regex>"
+ " || del <name>|-all [<name>...]"
+ " || default -yes"),
N_(" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
" add: add a rmodifier\n"
diff --git a/src/plugins/scripts/script.c b/src/plugins/scripts/script.c
index 8f36e2106..89524d6fe 100644
--- a/src/plugins/scripts/script.c
+++ b/src/plugins/scripts/script.c
@@ -257,11 +257,23 @@ script_init (struct t_weechat_plugin *weechat_plugin,
}
weechat_hook_command (weechat_plugin->name,
N_("list/load/unload scripts"),
- N_("[list [name]] | [listfull [name]] | "
- "[load filename] | [autoload] | "
- "[reload [name]] | [unload [name]]"),
- N_("filename: script (file) to load\n"
- "name: a script name\n\n"
+ N_("list|listfull [<name>]"
+ " || load <filename>"
+ " || autoload"
+ " || reload|unload [<name>]"),
+ N_(" list: list loaded scripts\n"
+ "listfull: list loaded scripts (verbose)\n"
+ " load: load a script\n"
+ "autoload: load all scripts in \"autoload\" "
+ "directory\n"
+ " reload: reload a script (if no name given, "
+ "unload all scripts, then load all scripts in "
+ "\"autoload\" directory)\n"
+ " unload: unload a script (if no name given, "
+ "unload all scripts)\n"
+ "filename: script (file) to load\n"
+ " name: a script name (name used in call to "
+ "\"register\" function)\n\n"
"Without argument, this command "
"lists all loaded scripts."),
completion,
diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c
index d0bb0ed16..57e87a107 100644
--- a/src/plugins/xfer/xfer-command.c
+++ b/src/plugins/xfer/xfer-command.c
@@ -245,12 +245,12 @@ xfer_command_init ()
{
weechat_hook_command ("me",
N_("send a CTCP action to remote host"),
- N_("message"),
+ N_("<message>"),
N_("message: message to send"),
NULL, &xfer_command_me, NULL);
weechat_hook_command ("xfer",
N_("xfer control"),
- "[list | listfull]",
+ "[list|listfull]",
N_(" list: list xfer\n"
"listfull: list xfer (verbose)\n\n"
"Without argument, this command opens buffer "