summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-18 20:33:19 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-01-18 20:33:19 +0100
commit8fc751532241e07031229f707c11b95e813fcfb7 (patch)
tree603b89a1de5ee5278a4d31d69d65ff908f41077f
parentfacd73734da8200ab44e5e323e0728da5bc7db1c (diff)
downloadweechat-8fc751532241e07031229f707c11b95e813fcfb7.zip
core: reformat hook_command arguments
-rw-r--r--src/core/wee-command.c2098
-rw-r--r--src/plugins/alias/alias.c93
-rw-r--r--src/plugins/aspell/weechat-aspell-command.c70
-rw-r--r--src/plugins/charset/charset.c21
-rw-r--r--src/plugins/irc/irc-command.c1434
-rw-r--r--src/plugins/logger/logger.c80
-rw-r--r--src/plugins/plugin-script.c46
-rw-r--r--src/plugins/relay/relay-command.c110
-rw-r--r--src/plugins/rmodifier/rmodifier-command.c74
-rw-r--r--src/plugins/script/script-command.c191
-rw-r--r--src/plugins/xfer/xfer-command.c28
11 files changed, 2133 insertions, 2112 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 6d963c42b..78c1092eb 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -6217,1063 +6217,1063 @@ COMMAND_CALLBACK(window)
void
command_init ()
{
- hook_command (NULL, "away",
- N_("set or remove away status"),
- N_("[-all] [<message>]"),
- N_(" -all: set or remove away status on all connected "
- "servers\n"
- "message: message for away (if no message is "
- "given, away status is removed)"),
- "-all", &command_away, NULL);
- hook_command (NULL, "bar",
- N_("manage bars"),
- N_("list|listfull|listitems"
- " || add <name> <type>[,<condition>] <position> <size> "
- "<separator> <item1>[,<item2>...]"
- " || default [input|title|status|nicklist]"
- " || del <name>|-all"
- " || set <name> <option> <value>"
- " || hide|show|toggle <name>"
- " || scroll <name> <window> <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"
- " condition: condition(s) for displaying bar (only for "
- "type \"window\"):\n"
- " active: on active window\n"
- " inactive: on inactive windows\n"
- " nicklist: on windows with nicklist\n"
- " other condition: see /help "
- "weechat.bar.xxx.conditions and /help eval\n"
- " without condition, the bar is always "
- "displayed\n"
- " position: bottom, top, left or right\n"
- " size: size of bar (in chars)\n"
- " separator: 1 for using separator (line), 0 or nothing "
- "means no separator\n"
- " item1,...: items for this bar (items can be separated "
- "by comma (space between items) or \"+\" (glued items))\n"
- " default: create a default bar (all default bars "
- "if no bar name is given)\n"
- " del: delete a bar (or all bars with -all)\n"
- " set: set a value for a bar property\n"
- " option: option to change (for options list, look "
- "at /set weechat.bar.<barname>.*)\n"
- " value: new value for option\n"
- " hide: hide a bar\n"
- " show: show an hidden bar\n"
- " toggle: hide/show a bar\n"
- " scroll: scroll bar\n"
- " window: window number (use '*' for current window "
- "or for root bars)\n"
- " scroll_value: value for scroll: 'x' or 'y' (optional), "
- "followed by '+', '-', 'b' (beginning) or 'e' (end), "
- "value (for +/-), and optional % (to scroll by % of "
- "width/height, 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"
- " hide a bar:\n"
- " /bar hide mybar\n"
- " scroll nicklist 10 lines down on current buffer:\n"
- " /bar scroll nicklist * y+10\n"
- " scroll to end of nicklist on current buffer:\n"
- " /bar scroll nicklist * ye"),
- "list"
- " || listfull"
- " || listitems"
- " || add %(bars_names) root|window bottom|top|left|right"
- " || default input|title|status|nicklist|%*"
- " || del %(bars_names)|-all"
- " || set %(bars_names) %(bars_options)"
- " || hide %(bars_names)"
- " || show %(bars_names)"
- " || toggle %(bars_names)"
- " || scroll %(bars_names) %(windows_numbers)|*",
- &command_bar, NULL);
- hook_command (NULL, "buffer",
- N_("manage buffers"),
- N_("list"
- " || clear [<number>|<name>|-merged|-all]"
- " || move|merge <number>"
- " || swap <number1>|<name1> [<number2>|<name2>]"
- " || unmerge [<number>|-all]"
- " || renumber [<number1> [<number2> [<start>]]]"
- " || close [<n1>[-<n2>]|<name>]"
- " || 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 "
- "example -1)\n"
- " swap: swap two buffers (swap with current buffer if "
- "only one number/name given)\n"
- " merge: merge current buffer to another buffer (chat "
- "area will be mix of both buffers)\n"
- " (by default ctrl-x switches between merged "
- "buffers)\n"
- " unmerge: unmerge buffer from other buffers which have "
- "same number\n"
- "renumber: renumber buffers (works only if option "
- "weechat.look.buffer_auto_renumber is off)\n"
- " close: close buffer (number/range or name is optional)\n"
- " notify: set notify level for current buffer: this "
- "level determines whether buffer will be added to "
- "hotlist or not:\n"
- " none: never\n"
- " highlight: for highlights only\n"
- " message: for messages from users + highlights\n"
- " all: all messages\n"
- " reset: reset to default value (all)\n"
- "localvar: display local variables for current buffer\n"
- " set: set a property for current buffer\n"
- " get: display a property of current buffer\n"
- " number: jump to buffer by number, possible prefix:\n"
- " '+': relative jump, add number to current\n"
- " '-': relative jump, sub number to current\n"
- " '*': jump to number, using option "
- "\"weechat.look.jump_current_to_previous_buffer\"\n"
- " name: jump to buffer by (partial) name\n\n"
- "Examples:\n"
- " clear current buffer:\n"
- " /buffer clear\n"
- " move buffer to number 5:\n"
- " /buffer move 5\n"
- " swap buffer 1 with 3:\n"
- " /buffer swap 1 3\n"
- " swap buffer #weechat with current buffer:\n"
- " /buffer swap #weechat\n"
- " merge with core buffer:\n"
- " /buffer merge 1\n"
- " unmerge buffer:\n"
- " /buffer unmerge\n"
- " close current buffer:\n"
- " /buffer close\n"
- " close buffers 5 to 7:\n"
- " /buffer close 5-7\n"
- " jump to #weechat:\n"
- " /buffer #weechat\n"
- " jump to next buffer:\n"
- " /buffer +1"),
- "clear -merged|-all|%(buffers_numbers)|"
- "%(buffers_plugins_names)"
- " || move %(buffers_numbers)"
- " || swap %(buffers_numbers)"
- " || merge %(buffers_numbers)"
- " || unmerge %(buffers_numbers)|-all"
- " || renumber %(buffers_numbers) %(buffers_numbers) "
- "%(buffers_numbers)"
- " || close %(buffers_plugins_names)"
- " || list"
- " || notify reset|none|highlight|message|all"
- " || localvar"
- " || set %(buffer_properties_set)"
- " || get %(buffer_properties_get)"
- " || %(buffers_plugins_names)|%(buffers_names)|"
- "%(irc_channels)|%(irc_privates)|%(buffers_numbers)",
- &command_buffer, NULL);
- hook_command (NULL, "color",
- N_("define color aliases and display palette of colors"),
- N_("alias <color> <name>"
- " || unalias <color>"
- " || reset"
- " || -o"),
- N_(" alias: add an alias for a color\n"
- "unalias: delete an alias\n"
- " color: color number (greater than or equal to 0, max "
- "depends on terminal, commonly 63 or 255)\n"
- " name: alias name for color (for example: \"orange\")\n"
- " reset: reset all color pairs (required when no more "
- "color pairs are available if automatic reset is disabled, "
- "see option weechat.look.color_pairs_auto_reset)\n"
- " -o: send terminal/colors info to current buffer as "
- "input\n\n"
- "Without argument, this command displays colors in a new "
- "buffer.\n\n"
- "Examples:\n"
- " add alias \"orange\" for color 214:\n"
- " /color alias 214 orange\n"
- " delete color 214:\n"
- " /color unalias 214"),
- "alias %(palette_colors)"
- " || unalias %(palette_colors)"
- " || reset"
- " || -o",
- &command_color, NULL);
+ hook_command (
+ NULL, "away",
+ N_("set or remove away status"),
+ N_("[-all] [<message>]"),
+ N_(" -all: set or remove away status on all connected servers\n"
+ "message: message for away (if no message is given, away status is "
+ "removed)"),
+ "-all", &command_away, NULL);
+ hook_command (
+ NULL, "bar",
+ N_("manage bars"),
+ N_("list|listfull|listitems"
+ " || add <name> <type>[,<condition>] <position> <size> <separator> "
+ "<item1>[,<item2>...]"
+ " || default [input|title|status|nicklist]"
+ " || del <name>|-all"
+ " || set <name> <option> <value>"
+ " || hide|show|toggle <name>"
+ " || scroll <name> <window> <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"
+ " condition: condition(s) for displaying bar (only for type "
+ "\"window\"):\n"
+ " active: on active window\n"
+ " inactive: on inactive windows\n"
+ " nicklist: on windows with nicklist\n"
+ " other condition: see /help weechat.bar.xxx.conditions "
+ "and /help eval\n"
+ " without condition, the bar is always displayed\n"
+ " position: bottom, top, left or right\n"
+ " size: size of bar (in chars)\n"
+ " separator: 1 for using separator (line), 0 or nothing means no "
+ "separator\n"
+ " item1,...: items for this bar (items can be separated by comma "
+ "(space between items) or \"+\" (glued items))\n"
+ " default: create a default bar (all default bars if no bar "
+ "name is given)\n"
+ " del: delete a bar (or all bars with -all)\n"
+ " set: set a value for a bar property\n"
+ " option: option to change (for options list, look at /set "
+ "weechat.bar.<barname>.*)\n"
+ " value: new value for option\n"
+ " hide: hide a bar\n"
+ " show: show an hidden bar\n"
+ " toggle: hide/show a bar\n"
+ " scroll: scroll bar\n"
+ " window: window number (use '*' for current window or for "
+ "root bars)\n"
+ " scroll_value: value for scroll: 'x' or 'y' (optional), followed by "
+ "'+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and "
+ "optional % (to scroll by % of width/height, 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"
+ " hide a bar:\n"
+ " /bar hide mybar\n"
+ " scroll nicklist 10 lines down on current buffer:\n"
+ " /bar scroll nicklist * y+10\n"
+ " scroll to end of nicklist on current buffer:\n"
+ " /bar scroll nicklist * ye"),
+ "list"
+ " || listfull"
+ " || listitems"
+ " || add %(bars_names) root|window bottom|top|left|right"
+ " || default input|title|status|nicklist|%*"
+ " || del %(bars_names)|-all"
+ " || set %(bars_names) %(bars_options)"
+ " || hide %(bars_names)"
+ " || show %(bars_names)"
+ " || toggle %(bars_names)"
+ " || scroll %(bars_names) %(windows_numbers)|*",
+ &command_bar, NULL);
+ hook_command (
+ NULL, "buffer",
+ N_("manage buffers"),
+ N_("list"
+ " || clear [<number>|<name>|-merged|-all]"
+ " || move|merge <number>"
+ " || swap <number1>|<name1> [<number2>|<name2>]"
+ " || unmerge [<number>|-all]"
+ " || renumber [<number1> [<number2> [<start>]]]"
+ " || close [<n1>[-<n2>]|<name>]"
+ " || 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 example -1)\n"
+ " swap: swap two buffers (swap with current buffer if only one "
+ "number/name given)\n"
+ " merge: merge current buffer to another buffer (chat area will "
+ "be mix of both buffers)\n"
+ " (by default ctrl-x switches between merged buffers)\n"
+ " unmerge: unmerge buffer from other buffers which have same number\n"
+ "renumber: renumber buffers (works only if option weechat.look."
+ "buffer_auto_renumber is off)\n"
+ " close: close buffer (number/range or name is optional)\n"
+ " notify: set notify level for current buffer: this level determines "
+ "whether buffer will be added to hotlist or not:\n"
+ " none: never\n"
+ " highlight: for highlights only\n"
+ " message: for messages from users + highlights\n"
+ " all: all messages\n"
+ " reset: reset to default value (all)\n"
+ "localvar: display local variables for current buffer\n"
+ " set: set a property for current buffer\n"
+ " get: display a property of current buffer\n"
+ " number: jump to buffer by number, possible prefix:\n"
+ " '+': relative jump, add number to current\n"
+ " '-': relative jump, sub number to current\n"
+ " '*': jump to number, using option \"weechat.look."
+ "jump_current_to_previous_buffer\"\n"
+ " name: jump to buffer by (partial) name\n"
+ "\n"
+ "Examples:\n"
+ " clear current buffer:\n"
+ " /buffer clear\n"
+ " move buffer to number 5:\n"
+ " /buffer move 5\n"
+ " swap buffer 1 with 3:\n"
+ " /buffer swap 1 3\n"
+ " swap buffer #weechat with current buffer:\n"
+ " /buffer swap #weechat\n"
+ " merge with core buffer:\n"
+ " /buffer merge 1\n"
+ " unmerge buffer:\n"
+ " /buffer unmerge\n"
+ " close current buffer:\n"
+ " /buffer close\n"
+ " close buffers 5 to 7:\n"
+ " /buffer close 5-7\n"
+ " jump to #weechat:\n"
+ " /buffer #weechat\n"
+ " jump to next buffer:\n"
+ " /buffer +1"),
+ "clear -merged|-all|%(buffers_numbers)|%(buffers_plugins_names)"
+ " || move %(buffers_numbers)"
+ " || swap %(buffers_numbers)"
+ " || merge %(buffers_numbers)"
+ " || unmerge %(buffers_numbers)|-all"
+ " || renumber %(buffers_numbers) %(buffers_numbers) %(buffers_numbers)"
+ " || close %(buffers_plugins_names)"
+ " || list"
+ " || notify reset|none|highlight|message|all"
+ " || localvar"
+ " || set %(buffer_properties_set)"
+ " || get %(buffer_properties_get)"
+ " || %(buffers_plugins_names)|%(buffers_names)|%(irc_channels)|"
+ "%(irc_privates)|%(buffers_numbers)",
+ &command_buffer, NULL);
+ hook_command (
+ NULL, "color",
+ N_("define color aliases and display palette of colors"),
+ N_("alias <color> <name> || unalias <color> || reset || -o"),
+ N_(" alias: add an alias for a color\n"
+ "unalias: delete an alias\n"
+ " color: color number (greater than or equal to 0, max depends on "
+ "terminal, commonly 63 or 255)\n"
+ " name: alias name for color (for example: \"orange\")\n"
+ " reset: reset all color pairs (required when no more color pairs "
+ "are available if automatic reset is disabled, see option "
+ "weechat.look.color_pairs_auto_reset)\n"
+ " -o: send terminal/colors info to current buffer as input\n"
+ "\n"
+ "Without argument, this command displays colors in a new buffer.\n"
+ "\n"
+ "Examples:\n"
+ " add alias \"orange\" for color 214:\n"
+ " /color alias 214 orange\n"
+ " delete color 214:\n"
+ " /color unalias 214"),
+ "alias %(palette_colors)"
+ " || unalias %(palette_colors)"
+ " || reset"
+ " || -o",
+ &command_color, NULL);
/*
* give high priority (50000) so that an alias will not take precedence
* over this command
*/
- hook_command (NULL, "50000|command",
- N_("launch explicit WeeChat or plugin command"),
- N_("<plugin> <command>"),
- N_(" plugin: plugin name ('weechat' for WeeChat internal "
- "command)\n"
- "command: command to execute (a '/' is automatically "
- "added if not found at beginning of command)"),
- "%(plugins_names)|" PLUGIN_CORE " %(plugins_commands)",
- &command_command, NULL);
- hook_command (NULL, "cursor",
- N_("free movement of cursor on screen to execute actions on "
- "specific areas of screen"),
- N_("go chat|<bar>|<x>,<y>"
- " || move up|down|left|right|area_up|area_down|area_left|"
- "area_right"
- " || stop"),
- N_(" go: move cursor to chat area, a bar (using bar name) "
- "or coordinates \"x,y\"\n"
- "move: move cursor with direction\n"
- "stop: stop cursor mode\n\n"
- "Without argument, this command toggles cursor mode.\n\n"
- "When mouse is enabled (see /help mouse), by default a "
- "middle click will start cursor mode at this point.\n\n"
- "Examples:\n"
- " go to nicklist:\n"
- " /cursor go nicklist\n"
- " go to coordinates x=10, y=5:\n"
- " /cursor go 10,5"),
- "go %(cursor_areas)"
- " || move up|down|left|right|area_up|area_down|area_left|"
- "area_right"
- " || stop",
- &command_cursor, NULL);
- hook_command (NULL, "debug",
- N_("control debug for core/plugins"),
- N_("list"
- " || set <plugin> <level>"
- " || dump [<plugin>]"
- " || buffer|color|infolists|memory|tags|term|windows"
- " || mouse|cursor [verbose]"
- " || hdata [free]"),
- 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 "
- "dump is written when WeeChat crashes)\n"
- " buffer: dump buffer content with hexadecimal values "
- "in log file\n"
- " color: display infos about current color pairs\n"
- " cursor: toggle debug for cursor mode\n"
- " dirs: display directories\n"
- " hdata: display infos about hdata (with free: remove "
- "all hdata in memory)\n"
- " hooks: display infos about hooks\n"
- "infolists: display infos about infolists\n"
- " libs: display infos about external libraries used\n"
- " memory: display infos about memory usage\n"
- " mouse: toggle debug for mouse\n"
- " tags: display tags for lines\n"
- " term: display infos about terminal\n"
- " windows: display windows tree"),
- "list"
- " || set %(plugins_names)|core"
- " || dump %(plugins_names)|core"
- " || buffer"
- " || color"
- " || cursor verbose"
- " || dirs"
- " || hdata free"
- " || hooks"
- " || infolists"
- " || libs"
- " || memory"
- " || mouse verbose"
- " || tags"
- " || term"
- " || windows",
- &command_debug, NULL);
- hook_command (NULL, "eval",
- N_("evaluate expression and send result to buffer"),
- N_("[-n] <expression>"
- " || [-n] -c <expression1> <operator> <expression2>"),
- N_(" -n: display result without sending it to buffer "
- "(debug mode)\n"
- " -c: evaluate as condition: use operators and "
- "parentheses, return a boolean value (\"0\" or \"1\")\n"
- "expression: expression to evaluate, variables with format "
- "${variable} are replaced (see below)\n"
- " operator: a logical or comparison operator:\n"
- " - logical operators:\n"
- " && boolean \"and\"\n"
- " || boolean \"or\"\n"
- " - comparison operators:\n"
- " == equal\n"
- " != not equal\n"
- " <= less or equal\n"
- " < less\n"
- " >= greater or equal\n"
- " > greater\n"
- " =~ is matching POSIX extended regex\n"
- " !~ is NOT matching POSIX extended regex\n\n"
- "An expression is considered as \"true\" if it is not NULL, "
- "not empty, and different from \"0\".\n"
- "The comparison is made using integers if the two "
- "expressions are valid integers.\n"
- "To force a string comparison, add double quotes around "
- "each expression, for example:\n"
- " 50 > 100 ==> 0\n"
- " \"50\" > \"100\" ==> 1\n\n"
- "Some variables are replaced in expression, using the "
- "format ${variable}, variable can be, by order of "
- "priority :\n"
- " 1. a color (format: \"color:xxx\")\n"
- " 2. an info (format: \"info:name,arguments\", arguments "
- "are optional)\n"
- " 3. an option (format: \"file.section.option\")\n"
- " 4. a local variable in buffer\n"
- " 5. a hdata name/variable (the value is automatically "
- "converted to string), by default \"window\" and \"buffer\" "
- "point to current window/buffer.\n"
- "Format for hdata can be one of following:\n"
- " hdata.var1.var2...: start with a hdata (pointer must be "
- "known), and ask variables one after one (other hdata can "
- "be followed)\n"
- " hdata[list].var1.var2...: start with a hdata using a "
- "list, for example:\n"
- " ${buffer[gui_buffers].full_name}: full name of first "
- "buffer in linked list of buffers\n"
- " ${plugin[weechat_plugins].name}: name of first plugin "
- "in linked list of plugins\n"
- "For name of hdata and variables, please look at \"Plugin "
- "API reference\", function \"weechat_hdata_get\".\n\n"
- "Examples:\n"
- " /eval -n ${info:version} ==> 0.4.3\n"
- " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
- " /eval -n ${window} ==> 0x2549aa0\n"
- " /eval -n ${window.buffer} ==> 0x2549320\n"
- " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
- " /eval -n ${window.buffer.number} ==> 1\n"
- " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
- " /eval -n -c ${window.win_width} > 100 ==> 1\n"
- " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
- " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
- " /eval -n -c abcd =~ ^ABC ==> 1\n"
- " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
- " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
- " /eval -n -c abcd !~ abc ==> 0"),
- "-n|-c -n|-c",
- &command_eval, NULL);
- 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> <buffer>[,<buffer>...] <tags> <regex>"
- " || del <name>|-all"),
- N_(" list: list all filters\n"
- " enable: enable filters (filters are enabled by "
- "default)\n"
- "disable: disable filters\n"
- " toggle: toggle filters\n"
- " name: filter name\n"
- " add: add a filter\n"
- " del: delete a filter\n"
- " -all: delete all filters\n"
- " buffer: comma separated list of buffers where filter "
- "is active:\n"
- " - this is full name including plugin (example: "
- "\"irc.freenode.#weechat\")\n"
- " - \"*\" means all buffers\n"
- " - a name starting with '!' is excluded\n"
- " - name can start or end with '*' to "
- "match many buffers\n"
- " tags: comma separated list of tags, for example "
- "\"irc_join,irc_part,irc_quit\"\n"
- " - logical \"and\": use \"+\" between tags (for "
- "example: \"nick_toto+irc_action\")\n"
- " - tags can start or end with '*'\n"
- " regex: POSIX extended regular expression to search in "
- "line\n"
- " - use '\\t' to separate prefix from message, "
- "special chars like '|' must be escaped: '\\|'\n"
- " - if regex starts with '!', then matching "
- "result is reversed (use '\\!' to start with '!')\n"
- " - two regular expressions are created: one for "
- "prefix and one for message\n"
- " - regex are case insensitive, they can start by "
- "\"(?-i)\" to become case sensitive\n\n"
- "The default key alt+'=' toggles filtering on/off.\n\n"
- "Tags most commonly used:\n"
- " no_filter, no_highlight, no_log, log0..log9 (log level),\n"
- " notify_none, notify_message, notify_private, "
- "notify_highlight,\n"
- " nick_xxx (xxx is nick in message), "
- "prefix_nick_ccc (ccc is color of nick),\n"
- " irc_xxx (xxx is command name or number, see /server raw "
- "or /debug tags),\n"
- " irc_numeric, irc_error, irc_action, irc_ctcp, "
- "irc_ctcp_reply, irc_smart_filter, away_info.\n"
- "To see tags for lines in buffers: /debug tags\n\n"
- "Examples:\n"
- " use IRC smart filter on all buffers:\n"
- " /filter add irc_smart * irc_smart_filter *\n"
- " use IRC smart filter on all buffers except those with "
- "\"#weechat\" in name:\n"
- " /filter add irc_smart *,!*#weechat* irc_smart_filter *\n"
- " filter all IRC join/part/quit messages:\n"
- " /filter add joinquit * irc_join,irc_part,irc_quit *\n"
- " filter nicks displayed when joining channels or with /names:\n"
- " /filter add nicks * irc_366 *\n"
- " filter nick \"toto\" on IRC channel #weechat:\n"
- " /filter add toto irc.freenode.#weechat nick_toto *\n"
- " filter IRC join/action messages from nick \"toto\":\n"
- " /filter add toto * nick_toto+irc_join,nick_toto+irc_action *\n"
- " filter lines containing \"weechat sucks\" on IRC "
- "channel #weechat:\n"
- " /filter add sucks irc.freenode.#weechat * weechat sucks"),
- "list"
- " || enable %(filters_names)"
- " || disable %(filters_names)"
- " || toggle %(filters_names)"
- " || add %(filters_names) %(buffers_plugins_names)|*"
- " || del %(filters_names)|-all",
- &command_filter, NULL);
- hook_command (NULL, "help",
- N_("display help about commands and options"),
- N_("-list|-listfull [<plugin> [<plugin>...]]"
- " || <command>"
- " || <option>"),
- N_(" -list: list commands, by plugin (without argument, "
- "this list is displayed)\n"
- "-listfull: list commands with description, by plugin\n"
- " plugin: list commands for this plugin\n"
- " command: a command name\n"
- " option: an option name (use /set to see list)"),
- "-list %(plugins_names)|" PLUGIN_CORE "|%*"
- " || -listfull %(plugins_names)|" PLUGIN_CORE "|%*"
- " || %(commands)|%(config_options)",
- &command_help, NULL);
- hook_command (NULL, "history",
- N_("show buffer command history"),
- N_("clear"
- " || <value>"),
- N_("clear: clear history\n"
- "value: number of history entries to show"),
- "clear",
- &command_history, NULL);
+ hook_command (
+ NULL, "50000|command",
+ N_("launch explicit WeeChat or plugin command"),
+ N_("<plugin> <command>"),
+ N_(" plugin: plugin name ('weechat' for WeeChat internal command)\n"
+ "command: command to execute (a '/' is automatically added if not "
+ "found at beginning of command)"),
+ "%(plugins_names)|" PLUGIN_CORE " %(plugins_commands)",
+ &command_command, NULL);
+ hook_command (
+ NULL, "cursor",
+ N_("free movement of cursor on screen to execute actions on specific "
+ "areas of screen"),
+ N_("go chat|<bar>|<x>,<y>"
+ " || move up|down|left|right|area_up|area_down|area_left|area_right"
+ " || stop"),
+ N_(" go: move cursor to chat area, a bar (using bar name) or "
+ "coordinates \"x,y\"\n"
+ "move: move cursor with direction\n"
+ "stop: stop cursor mode\n"
+ "\n"
+ "Without argument, this command toggles cursor mode.\n"
+ "\n"
+ "When mouse is enabled (see /help mouse), by default a middle click "
+ "will start cursor mode at this point.\n"
+ "\n"
+ "Examples:\n"
+ " go to nicklist:\n"
+ " /cursor go nicklist\n"
+ " go to coordinates x=10, y=5:\n"
+ " /cursor go 10,5"),
+ "go %(cursor_areas)"
+ " || move up|down|left|right|area_up|area_down|area_left|area_right"
+ " || stop",
+ &command_cursor, NULL);
+ hook_command (
+ NULL, "debug",
+ N_("control debug for core/plugins"),
+ N_("list"
+ " || set <plugin> <level>"
+ " || dump [<plugin>]"
+ " || buffer|color|infolists|memory|tags|term|windows"
+ " || mouse|cursor [verbose]"
+ " || hdata [free]"),
+ 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 dump is "
+ "written when WeeChat crashes)\n"
+ " buffer: dump buffer content with hexadecimal values in log file\n"
+ " color: display infos about current color pairs\n"
+ " cursor: toggle debug for cursor mode\n"
+ " dirs: display directories\n"
+ " hdata: display infos about hdata (with free: remove all hdata "
+ "in memory)\n"
+ " hooks: display infos about hooks\n"
+ "infolists: display infos about infolists\n"
+ " libs: display infos about external libraries used\n"
+ " memory: display infos about memory usage\n"
+ " mouse: toggle debug for mouse\n"
+ " tags: display tags for lines\n"
+ " term: display infos about terminal\n"
+ " windows: display windows tree"),
+ "list"
+ " || set %(plugins_names)|core"
+ " || dump %(plugins_names)|core"
+ " || buffer"
+ " || color"
+ " || cursor verbose"
+ " || dirs"
+ " || hdata free"
+ " || hooks"
+ " || infolists"
+ " || libs"
+ " || memory"
+ " || mouse verbose"
+ " || tags"
+ " || term"
+ " || windows",
+ &command_debug, NULL);
+ hook_command (
+ NULL, "eval",
+ N_("evaluate expression and send result to buffer"),
+ N_("[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"),
+ N_(" -n: display result without sending it to buffer (debug mode)\n"
+ " -c: evaluate as condition: use operators and parentheses, "
+ "return a boolean value (\"0\" or \"1\")\n"
+ "expression: expression to evaluate, variables with format "
+ "${variable} are replaced (see below)\n"
+ " operator: a logical or comparison operator:\n"
+ " - logical operators:\n"
+ " && boolean \"and\"\n"
+ " || boolean \"or\"\n"
+ " - comparison operators:\n"
+ " == equal\n"
+ " != not equal\n"
+ " <= less or equal\n"
+ " < less\n"
+ " >= greater or equal\n"
+ " > greater\n"
+ " =~ is matching POSIX extended regex\n"
+ " !~ is NOT matching POSIX extended regex\n"
+ "\n"
+ "An expression is considered as \"true\" if it is not NULL, not "
+ "empty, and different from \"0\".\n"
+ "The comparison is made using integers if the two expressions are "
+ "valid integers.\n"
+ "To force a string comparison, add double quotes around each "
+ "expression, for example:\n"
+ " 50 > 100 ==> 0\n"
+ " \"50\" > \"100\" ==> 1\n"
+ "\n"
+ "Some variables are replaced in expression, using the format "
+ "${variable}, variable can be, by order of priority :\n"
+ " 1. a color (format: \"color:xxx\")\n"
+ " 2. an info (format: \"info:name,arguments\", arguments are "
+ "optional)\n"
+ " 3. an option (format: \"file.section.option\")\n"
+ " 4. a local variable in buffer\n"
+ " 5. a hdata name/variable (the value is automatically converted "
+ "to string), by default \"window\" and \"buffer\" point to current "
+ "window/buffer.\n"
+ "Format for hdata can be one of following:\n"
+ " hdata.var1.var2...: start with a hdata (pointer must be known), "
+ "and ask variables one after one (other hdata can be followed)\n"
+ " hdata[list].var1.var2...: start with a hdata using a list, for "
+ "example:\n"
+ " ${buffer[gui_buffers].full_name}: full name of first buffer in "
+ "linked list of buffers\n"
+ " ${plugin[weechat_plugins].name}: name of first plugin in linked "
+ "list of plugins\n"
+ "For name of hdata and variables, please look at \"Plugin API "
+ "reference\", function \"weechat_hdata_get\".\n"
+ "\n"
+ "Examples:\n"
+ " /eval -n ${info:version} ==> 0.4.3\n"
+ " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
+ " /eval -n ${window} ==> 0x2549aa0\n"
+ " /eval -n ${window.buffer} ==> 0x2549320\n"
+ " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
+ " /eval -n ${window.buffer.number} ==> 1\n"
+ " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
+ " /eval -n -c ${window.win_width} > 100 ==> 1\n"
+ " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
+ " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
+ " /eval -n -c abcd =~ ^ABC ==> 1\n"
+ " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
+ " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
+ " /eval -n -c abcd !~ abc ==> 0"),
+ "-n|-c -n|-c",
+ &command_eval, NULL);
+ 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> <buffer>[,<buffer>...] <tags> <regex>"
+ " || del <name>|-all"),
+ N_(" list: list all filters\n"
+ " enable: enable filters (filters are enabled by default)\n"
+ "disable: disable filters\n"
+ " toggle: toggle filters\n"
+ " name: filter name\n"
+ " add: add a filter\n"
+ " del: delete a filter\n"
+ " -all: delete all filters\n"
+ " buffer: comma separated list of buffers where filter is active:\n"
+ " - this is full name including plugin (example: \"irc."
+ "freenode.#weechat\")\n"
+ " - \"*\" means all buffers\n"
+ " - a name starting with '!' is excluded\n"
+ " - name can start or end with '*' to match many buffers\n"
+ " tags: comma separated list of tags, for example \"irc_join,"
+ "irc_part,irc_quit\"\n"
+ " - logical \"and\": use \"+\" between tags (for example: "
+ "\"nick_toto+irc_action\")\n"
+ " - tags can start or end with '*'\n"
+ " regex: POSIX extended regular expression to search in line\n"
+ " - use '\\t' to separate prefix from message, special chars "
+ "like '|' must be escaped: '\\|'\n"
+ " - if regex starts with '!', then matching result is "
+ "reversed (use '\\!' to start with '!')\n"
+ " - two regular expressions are created: one for prefix and "
+ "one for message\n"
+ " - regex are case insensitive, they can start by \"(?-i)\" "
+ "to become case sensitive\n"
+ "\n"
+ "The default key alt+'=' toggles filtering on/off.\n"
+ "\n"
+ "Tags most commonly used:\n"
+ " no_filter, no_highlight, no_log, log0..log9 (log level),\n"
+ " notify_none, notify_message, notify_private, notify_highlight,\n"
+ " nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color "
+ "of nick),\n"
+ " irc_xxx (xxx is command name or number, see /server raw or /debug "
+ "tags),\n"
+ " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
+ "irc_smart_filter, away_info.\n"
+ "To see tags for lines in buffers: /debug tags\n"
+ "\n"
+ "Examples:\n"
+ " use IRC smart filter on all buffers:\n"
+ " /filter add irc_smart * irc_smart_filter *\n"
+ " use IRC smart filter on all buffers except those with \"#weechat\" "
+ "in name:\n"
+ " /filter add irc_smart *,!*#weechat* irc_smart_filter *\n"
+ " filter all IRC join/part/quit messages:\n"
+ " /filter add joinquit * irc_join,irc_part,irc_quit *\n"
+ " filter nicks displayed when joining channels or with /names:\n"
+ " /filter add nicks * irc_366 *\n"
+ " filter nick \"toto\" on IRC channel #weechat:\n"
+ " /filter add toto irc.freenode.#weechat nick_toto *\n"
+ " filter IRC join/action messages from nick \"toto\":\n"
+ " /filter add toto * nick_toto+irc_join,nick_toto+irc_action *\n"
+ " filter lines containing \"weechat sucks\" on IRC channel #weechat:\n"
+ " /filter add sucks irc.freenode.#weechat * weechat sucks"),
+ "list"
+ " || enable %(filters_names)"
+ " || disable %(filters_names)"
+ " || toggle %(filters_names)"
+ " || add %(filters_names) %(buffers_plugins_names)|*"
+ " || del %(filters_names)|-all",
+ &command_filter, NULL);
+ hook_command (
+ NULL, "help",
+ N_("display help about commands and options"),
+ N_("-list|-listfull [<plugin> [<plugin>...]] || <command> || <option>"),
+ N_(" -list: list commands, by plugin (without argument, this list is "
+ "displayed)\n"
+ "-listfull: list commands with description, by plugin\n"
+ " plugin: list commands for this plugin\n"
+ " command: a command name\n"
+ " option: an option name (use /set to see list)"),
+ "-list %(plugins_names)|" PLUGIN_CORE "|%*"
+ " || -listfull %(plugins_names)|" PLUGIN_CORE "|%*"
+ " || %(commands)|%(config_options)",
+ &command_help, NULL);
+ hook_command (
+ NULL, "history",
+ N_("show buffer command history"),
+ N_("clear || <value>"),
+ N_("clear: clear history\n"
+ "value: number of history entries to show"),
+ "clear",
+ &command_history, NULL);
/*
* give high priority (50000) so that an alias will not take precedence
* over this command
*/
- hook_command (NULL, "50000|input",
- N_("functions for command line"),
- 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"
- " search_switch_case: switch exact case for search\n"
- " search_switch_regex: switch search type: string/regular expression\n"
- " search_switch_where: switch search in messages/prefixes\n"
- " search_previous: search previous line\n"
- " search_next: search next line\n"
- " search_stop: stop search\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_last_buffer_displayed: jump to last buffer "
- "displayed (before last jump to a 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 (optional argument: delay for end "
- "of grab, default is 500 milliseconds)\n"
- " grab_key_command: grab a key with its associated "
- "command (optional argument: delay for end of grab, "
- "default is 500 milliseconds)\n"
- " grab_mouse: grab mouse event code\n"
- " grab_mouse_area: grab mouse event code with area\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"
- " zoom_merged_buffer: zoom on merged buffer\n"
- " insert: insert text in command line\n"
- " paste_start: start paste (bracketed paste mode)\n"
- " paste_stop: stop paste (bracketed paste mode)\n\n"
- "This command is used by key bindings or plugins."),
- "return|complete_next|complete_previous|search_text|"
- "search_switch_case|search_previous|search_next|search_stop|"
- "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|grab_mouse|grab_mouse_area|set_unread|"
- "set_unread_current_buffer|switch_active_buffer|"
- "switch_active_buffer_previous|zoom_merged_buffer|insert|"
- "paste_start|paste_stop",
- &command_input, NULL);
- hook_command (NULL, "key",
- N_("bind/unbind keys"),
- N_("list|listdefault|listdiff [<context>]"
- " || bind <key> [<command> [<args>]]"
- " || bindctxt <context> <key> [<command> [<args>]]"
- " || unbind <key>"
- " || unbindctxt <context> <key>"
- " || reset <key>"
- " || resetctxt <context> <key>"
- " || resetall -yes [<context>]"
- " || missing [<context>]"),
- N_(" list: list all current keys (without argument, "
- "this list is displayed)\n"
- "listdefault: list default keys\n"
- " listdiff: list differences between current and "
- "default keys (keys added, redefined or deleted)\n"
- " context: name of context (\"default\" or "
- "\"search\")\n"
- " bind: bind a command to a key or display command "
- "bound to key (for context \"default\")\n"
- " bindctxt: bind a command to a key or display command "
- "bound to key, for given context\n"
- " command: command (many commands can be separated by "
- "semicolons)\n"
- " unbind: remove a key binding (for context "
- "\"default\")\n"
- " unbindctxt: remove a key binding for given context\n"
- " reset: reset a key to default binding (for "
- "context \"default\")\n"
- " resetctxt: reset a key to default binding, for given "
- "context\n"
- " resetall: restore bindings to the default values and "
- "delete ALL personal bindings (use carefully!)\n"
- " missing: add missing keys (using default bindings), "
- "useful after installing new WeeChat version\n\n"
- "When binding a command to a key, it is recommended to "
- "use key alt+k (or Esc then k), and then press the key "
- "to bind: this will insert key code in command line.\n\n"
- "For context \"mouse\" (possible in context \"cursor\" "
- "too), key has format: \"@area:key\" or "
- "\"@area1>area2:key\" where area can be:\n"
- " *: any area on screen\n"
- " chat: chat area (any buffer)\n"
- " chat(xxx): char area for buffer with name \"xxx\" (full "
- "name including plugin)\n"
- " bar(*): any bar\n"
- " bar(xxx): bar \"xxx\"\n"
- " item(*): any bar item\n"
- " item(xxx): bar item \"xxx\"\n"
- "The key can start or end with '*' to match many mouse "
- "events.\n"
- "A special value for command with format \"hsignal:name\" "
- "can be used for context mouse, this will send the hsignal "
- "\"name\" with the focus hashtable as argument.\n"
- "Another special value \"-\" can be used to disable key "
- "(it will be ignored when looking for keys).\n\n"
- "Examples:\n"
- " key alt-x to toggle nicklist bar:\n"
- " /key bind meta-x /bar toggle nicklist\n"
- " key alt-r to jump to #weechat IRC channel:\n"
- " /key bind meta-r /buffer #weechat\n"
- " restore default binding for key alt-r:\n"
- " /key reset meta-r\n"
- " key \"tab\" to stop search in buffer:\n"
- " /key bindctxt search ctrl-I /input search_stop\n"
- " middle button of mouse on a nick to retrieve info on "
- "nick:\n"
- " /key bindctxt mouse @item(buffer_nicklist):button3 "
- "/msg nickserv info ${nick}"),
- "list %(keys_contexts)"
- " || listdefault %(keys_contexts)"
- " || listdiff %(keys_contexts)"
- " || bind %(keys_codes) %(commands)"
- " || bindctxt %(keys_contexts) %(keys_codes) %(commands)"
- " || unbind %(keys_codes)"
- " || unbindctxt %(keys_contexts) %(keys_codes)"
- " || reset %(keys_codes_for_reset)"
- " || resetctxt %(keys_contexts) %(keys_codes_for_reset)"
- " || resetall %- %(keys_contexts)"
- " || missing %(keys_contexts)",
- &command_key, NULL);
- hook_command (NULL, "layout",
- N_("manage buffers/windows layouts"),
- N_("store [<name>] [buffers|windows]"
- " || apply [<name>] [buffers|windows]"
- " || leave"
- " || del [<name>] [buffers|windows]"
- " || rename <name> <new_name>"),
- N_(" store: store current buffers/windows in a layout\n"
- " apply: apply saved layout\n"
- " leave: leave current layout (does not update any layout)\n"
- " del: delete buffers and/or windows in a saved layout\n"
- " (if neither \"buffers\" nor \"windows\" is given "
- "after the name, the layout is deleted)\n"
- " rename: rename a layout\n"
- " name: name for saved layout (default is \"default\")\n"
- "buffers: save/apply only buffers (order of buffers)\n"
- "windows: save/apply only windows (buffer displayed by "
- "each window)\n\n"
- "Without argument, this command displays saved layouts."),
- "store %(layouts_names)|buffers|windows buffers|windows"
- " || apply %(layouts_names)|buffers|windows buffers|windows"
- " || leave"
- " || del %(layouts_names)|buffers|windows buffers|windows"
- " || rename %(layouts_names) %(layouts_names)",
- &command_layout, NULL);
- hook_command (NULL, "mouse",
- N_("mouse control"),
- N_("enable|disable|toggle [<delay>]"),
- N_(" enable: enable mouse\n"
- "disable: disable mouse\n"
- " toggle: toggle mouse\n"
- " delay: delay (in seconds) after which initial mouse "
- "state is restored (useful to temporarily disable mouse)\n\n"
- "The mouse state is saved in option \"weechat.look.mouse\".\n\n"
- "Examples:\n"
- " enable mouse:\n"
- " /mouse enable\n"
- " toggle mouse for 5 seconds:\n"
- " /mouse toggle 5"),
- "enable|disable|toggle",
- &command_mouse, NULL);
- hook_command (NULL, "mute",
- N_("execute a command silently"),
- N_("[-current | -buffer <name> | -all] command"),
- N_("-current: no output on current buffer\n"
- " -buffer: no output on specified buffer\n"
- " name: full buffer name (examples: "
- "\"irc.server.freenode\", \"irc.freenode.#weechat\")\n"
- " -all: no output on ALL buffers\n"
- " command: command to execute silently (a '/' is "
- "automatically added if not found at beginning of "
- "command)\n\n"
- "If no target is specified (-current, -buffer or -all), "
- "then default is to mute WeeChat core buffer only.\n\n"
- "Examples:\n"
- " config save:\n"
- " /mute save\n"
- " message to current IRC channel:\n"
- " /mute -current msg * hi!\n"
- " message to #weechat channel:\n"
- " /mute -buffer irc.freenode.#weechat msg #weechat hi!"),
- "-current %(commands)|%*"
- " || -buffer %(buffers_plugins_names) %(commands)|%*"
- " || -all %(commands)|%*"
- " || %(commands)|%*",
- &command_mute, NULL);
- hook_command (NULL, "plugin",
- N_("list/load/unload plugins"),
- N_("list|listfull [<name>]"
- " || load <filename> [<arguments>]"
- " || autoload [<arguments>]"
- " || reload [<name> [<arguments>]]"
- " || 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 a plugin (if no name given, unload "
- "all plugins, then autoload plugins)\n"
- " unload: unload a plugin (if no name given, unload "
- "all plugins)\n"
- " filename: plugin (file) to load\n"
- " name: a plugin name\n"
- "arguments: arguments given to plugin on load\n\n"
- "Without argument, this command lists loaded plugins."),
- "list %(plugins_names)"
- " || listfull %(plugins_names)"
- " || load %(plugins_installed)"
- " || autoload"
- " || reload %(plugins_names)"
- " || unload %(plugins_names)",
- &command_plugin, NULL);
- hook_command (NULL, "proxy",
- N_("manage proxies"),
- 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\n"
- "Examples:\n"
- " create a http proxy, running on local host, port 8888:\n"
- " /proxy add local http 127.0.0.1 8888\n"
- " create a http proxy using IPv6 protocol:\n"
- " /proxy add local http ::1 8888\n"
- " /proxy set local ipv6 on\n"
- " create a socks5 proxy with username/password:\n"
- " /proxy add myproxy socks5 sample.host.org 3128 myuser mypass\n"
- " delete a proxy:\n"
- " /proxy del myproxy"),
- "list"
- " || add %(proxies_names) http|socks4|socks5"
- " || del %(proxies_names)"
- " || set %(proxies_names) %(proxies_options)",
- &command_proxy, NULL);
- hook_command (NULL, "quit",
- N_("quit WeeChat"),
- N_("[-yes] [<arguments>]"),
- N_(" -yes: required if option weechat.look.confirm_quit "
- "is enabled\n"
- "arguments: text sent with signal \"quit\"\n"
- " (for example irc plugin uses this text to "
- "send quit message to server)"),
- "",
- &command_quit, NULL);
- hook_command (NULL, "reload",
- N_("reload configuration files from disk"),
- 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, "repeat",
- N_("execute a command several times"),
- N_("[-interval <delay>] <count> <command>"),
- N_(" delay: delay between execution of commands (in "
- "milliseconds)\n"
- " count: number of times to execute command\n"
- "command: command to execute (a '/' is automatically "
- "added if not found at beginning of command)\n\n"
- "All commands are executed on buffer where this command "
- "was issued.\n\n"
- "Example:\n"
- " scroll 2 pages up:\n"
- " /repeat 2 /window page_up"),
- "%- %(commands)",
- &command_repeat, NULL);
- hook_command (NULL, "save",
- N_("save configuration files to disk"),
- 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, "secure",
- N_("manage secured data (passwords or private data encrypted "
- "in file sec.conf)"),
- N_("passphrase <passphrase>|-delete"
- " || decrypt <passphrase>|-discard"
- " || set <name> <value>"
- " || del <name>"),
- N_("passphrase: change the passphrase (without passphrase, "
- "data is stored as plain text in file sec.conf)\n"
- " -delete: delete passphrase\n"
- " decrypt: decrypt data still encrypted (it happens only "
- "if passphrase was not given on startup)\n"
- " -discard: discard all data still encrypted\n"
- " set: add or change secured data\n"
- " del: delete secured data\n\n"
- "Without argument, this command displays secured data "
- "in a new buffer.\n\n"
- "When a passphrase is used (data encrypted), it is asked "
- "by WeeChat on startup.\n"
- "It is possible to set environment variable "
- "\"WEECHAT_PASSPHRASE\" to prevent the prompt (this same "
- "variable is used by WeeChat on /upgrade).\n\n"
- "Secured data with format ${sec.data.xxx} can be used in:\n"
- " - command line argument \"--run-command\"\n"
- " - options weechat.startup.command_{before|after}_plugins\n"
- " - proxy options: username, password\n"
- " - irc server options: autojoin, command, password, "
- "sasl_{username|password}\n"
- " - option relay.network.password\n"
- " - command /eval.\n\n"
- "Examples:\n"
- " set a passphrase:\n"
- " /secure passphrase this is my passphrase\n"
- " encrypt freenode SASL password:\n"
- " /secure set freenode mypassword\n"
- " /set irc.server.freenode.sasl_password "
- "\"${sec.data.freenode}\"\n"
- " encrypt oftc password for nickserv:\n"
- " /secure set oftc mypassword\n"
- " /set irc.server.oftc.command \"/msg nickserv identify "
- "${sec.data.oftc}\"\n"
- " alias to ghost the nick \"mynick\":\n"
- " /alias ghost /eval /msg -server freenode nickserv "
- "ghost mynick ${sec.data.freenode}"),
- "passphrase -delete"
- " || decrypt -discard"
- " || set %(secured_data)"
- " || del %(secured_data)",
- &command_secure, NULL);
- hook_command (NULL, "set",
- N_("set config options"),
- N_("[<option> [<value>]] || diff [<option> [<option>...]]"),
- N_("option: name of an option (can start or end with '*' "
- "to list many options)\n"
- " value: new value for option\n"
- " diff: display only changed options\n\n"
- "New value can be, according to variable type:\n"
- " boolean: on, off or toggle\n"
- " integer: number, ++number or --number\n"
- " string: any string (\"\" for empty string)\n"
- " 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.\n\n"
- "Examples:\n"
- " display options about highlight:\n"
- " /set *highlight*\n"
- " add a word to highlight:\n"
- " /set weechat.look.highlight \"word\"\n"
- " display changed options:\n"
- " /set diff\n"
- " display changed options in irc plugin:\n"
- " /set diff irc.*"),
- "%(config_options) %(config_option_values)"
- " || diff %(config_options)|%*",
- &command_set, NULL);
- hook_command (NULL, "unset",
- N_("unset/reset config options"),
- 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).\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>|-quit]"),
- N_("path_to_binary: path to WeeChat binary (default is "
- "current binary)\n"
- " -dummy: do nothing (option used to prevent "
- "accidental completion with \"-quit\")\n"
- " -quit: close *ALL* connections, save session "
- "and quit WeeChat, which makes possible a delayed "
- "restoration (see below)\n\n"
- "This command upgrades and reloads a running WeeChat "
- "session. The new WeeChat binary must have been compiled "
- "or installed with a package manager before running this "
- "command.\n\n"
- "Note: SSL connections are lost during upgrade, because "
- "reload of SSL sessions is currently not possible with "
- "GnuTLS. There is automatic reconnection after "
- "upgrade.\n\n"
- "Upgrade process has 4 steps:\n"
- " 1. save session into files for core and plugins "
- "(buffers, history, ..)\n"
- " 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.\n\n"
- "With option \"-quit\", the process is slightly "
- "different:\n"
- " 1. close *ALL* connections (irc, xfer, relay, ...)\n"
- " 2. save session into files (*.upgrade)\n"
- " 3. unload all plugins\n"
- " 4. save WeeChat configuration\n"
- " 5. quit WeeChat\n"
- "Then later you can restore session with command: "
- "weechat --upgrade\n"
- "IMPORTANT: you must restore the session with exactly "
- "same configuration (files *.conf).\n"
- "It is possible to restore WeeChat session on another "
- "machine if you copy the content of directory \"~/.weechat\"."),
- "%(filename)|-dummy|-quit",
- &command_upgrade, NULL);
- hook_command (NULL, "uptime",
- N_("show WeeChat uptime"),
- "[-o | -ol]",
- N_(" -o: send uptime to current buffer as input (english "
- "string)\n"
- "-ol: send uptime to current buffer as input (translated "
- "string)"),
- "-o|-ol",
- &command_uptime, NULL);
- hook_command (NULL, "version",
- N_("show WeeChat version and compilation date"),
- "[-o | -ol]",
- N_(" -o: send version to current buffer as input (english "
- "string)\n"
- "-ol: send version to current buffer as input (translated "
- "string)"),
- "-o|-ol",
- &command_version, NULL);
- hook_command (NULL, "wait",
- N_("schedule a command execution in future"),
- N_("<number>[<unit>] <command>"),
- N_(" number: amount of time to wait (integer number)\n"
- " unit: optional, values are:\n"
- " ms: milliseconds\n"
- " s: seconds (default)\n"
- " m: minutes\n"
- " h: hours\n"
- "command: command to execute (or text to send to buffer "
- "if command does not start with '/')\n\n"
- "Note: command is executed on buffer where /wait was "
- "executed (if buffer is not found (for example if it has "
- "been closed before execution of command), then command "
- "is executed on WeeChat core buffer).\n\n"
- "Examples:\n"
- " join channel in 10 seconds:\n"
- " /wait 10 /join #test\n"
- " set away in 15 minutes:\n"
- " /wait 15m /away -all I'm away\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 [-window <number>]"
- " || <number>"
- " || splith|splitv [-window <number>] [<pct>]"
- " || resize [-window <number>] [+/-]<pct>"
- " || balance"
- " || merge [-window <number>] [all]"
- " || page_up|page_down [-window <number>]"
- " || refresh"
- " || scroll [-window <number>] [+/-]<value>[s|m|h|d|M|y]"
- " || scroll_horiz [-window <number>] [+/-]<value>[%]"
- " || scroll_up|scroll_down|scroll_top|"
- "scroll_bottom|scroll_beyond_end|scroll_previous_highlight|"
- "scroll_next_highlight|scroll_unread [-window <number>]"
- " || swap [-window <number>] [up|down|left|right]"
- " || zoom[-window <number>]"),
- N_(" list: list opened windows (without argument, "
- "this list is displayed)\n"
- " -1: jump to previous window\n"
- " +1: jump to next window\n"
- " b#: jump to next window displaying buffer number #\n"
- " up: switch to window above current one\n"
- " down: switch to window below current one\n"
- " left: switch to window on the left\n"
- " right: switch to window on the right\n"
- " number: window number (see /window list)\n"
- " splith: split current window horizontally\n"
- " splitv: split current window vertically\n"
- " resize: resize window size, new size is <pct> "
- "percentage of parent window\n"
- " balance: balance the sizes of all windows\n"
- " merge: merge window with another (all = keep only one "
- "window)\n"
- " page_up: scroll one page up\n"
- " page_down: scroll one page down\n"
- " refresh: refresh screen\n"
- " scroll: scroll a number of lines (+/-N) or with time: "
- "s=seconds, m=minutes, h=hours, d=days, M=months, y=years\n"
- " scroll_horiz: scroll horizontally a number of columns "
- "(+/-N) or percentage of window size (this scrolling is "
- "possible only on buffers with free content)\n"
- " scroll_up: scroll a few lines up\n"
- " scroll_down: scroll a few lines down\n"
- " scroll_top: scroll to top of buffer\n"
- "scroll_bottom: scroll to bottom of buffer\n"
- "scroll_beyond_end: scroll beyond the end of buffer\n"
- "scroll_previous_highlight: scroll to previous highlight\n"
- "scroll_next_highlight: scroll to next highlight\n"
- "scroll_unread: scroll to unread marker\n"
- " swap: swap buffers of two windows (with optional "
- "direction for target window)\n"
- " zoom: zoom on window\n\n"
- "For splith and splitv, pct is a percentage which "
- "represents size of new window, computed with current "
- "window as size reference. For example 25 means create a "
- "new window with size = current_size / 4\n\n"
- "Examples:\n"
- " jump to window displaying buffer #1:\n"
- " /window b1\n"
- " scroll 2 lines up:\n"
- " /window scroll -2\n"
- " scroll 2 days up:\n"
- " /window scroll -2d\n"
- " scroll to beginning of current day:\n"
- " /window scroll -d\n"
- " zoom on window #2:\n"
- " /window zoom -window 2"),
- "list"
- " || -1 -window %(windows_numbers)"
- " || +1 -window %(windows_numbers)"
- " || up -window %(windows_numbers)"
- " || down -window %(windows_numbers)"
- " || left -window %(windows_numbers)"
- " || right -window %(windows_numbers)"
- " || splith -window %(windows_numbers)"
- " || splitv -window %(windows_numbers)"
- " || resize -window %(windows_numbers)"
- " || balance"
- " || page_up -window %(windows_numbers)"
- " || page_down -window %(windows_numbers)"
- " || refresh"
- " || scroll -window %(windows_numbers)"
- " || scroll_horiz -window %(windows_numbers)"
- " || scroll_up -window %(windows_numbers)"
- " || scroll_down -window %(windows_numbers)"
- " || scroll_top -window %(windows_numbers)"
- " || scroll_bottom -window %(windows_numbers)"
- " || scroll_beyond_end -window %(windows_numbers)"
- " || scroll_previous_highlight -window %(windows_numbers)"
- " || scroll_next_highlight -window %(windows_numbers)"
- " || scroll_unread -window %(windows_numbers)"
- " || swap up|down|left|right|-window %(windows_numbers)"
- " || zoom -window %(windows_numbers)"
- " || merge all|-window %(windows_numbers)"
- " || %(windows_numbers)",
- &command_window, NULL);
+ hook_command (
+ NULL, "50000|input",
+ N_("functions for command line"),
+ 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"
+ " search_switch_case: switch exact case for search\n"
+ " search_switch_regex: switch search type: string/regular expression\n"
+ " search_switch_where: switch search in messages/prefixes\n"
+ " search_previous: search previous line\n"
+ " search_next: search next line\n"
+ " search_stop: stop search\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_last_buffer_displayed: jump to last buffer displayed (before "
+ "last jump to a 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 (optional argument: delay for end of grab, "
+ "default is 500 milliseconds)\n"
+ " grab_key_command: grab a key with its associated command (optional "
+ "argument: delay for end of grab, default is 500 milliseconds)\n"
+ " grab_mouse: grab mouse event code\n"
+ " grab_mouse_area: grab mouse event code with area\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"
+ " zoom_merged_buffer: zoom on merged buffer\n"
+ " insert: insert text in command line\n"
+ " paste_start: start paste (bracketed paste mode)\n"
+ " paste_stop: stop paste (bracketed paste mode)\n"
+ "\n"
+ "This command is used by key bindings or plugins."),
+ "return|complete_next|complete_previous|search_text|search_switch_case|"
+ "search_previous|search_next|search_stop|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|grab_mouse|grab_mouse_area|set_unread|"
+ "set_unread_current_buffer|switch_active_buffer|"
+ "switch_active_buffer_previous|zoom_merged_buffer|insert|paste_start|"
+ "paste_stop",
+ &command_input, NULL);
+ hook_command (
+ NULL, "key",
+ N_("bind/unbind keys"),
+ N_("list|listdefault|listdiff [<context>]"
+ " || bind <key> [<command> [<args>]]"
+ " || bindctxt <context> <key> [<command> [<args>]]"
+ " || unbind <key>"
+ " || unbindctxt <context> <key>"
+ " || reset <key>"
+ " || resetctxt <context> <key>"
+ " || resetall -yes [<context>]"
+ " || missing [<context>]"),
+ N_(" list: list all current keys (without argument, this list is "
+ "displayed)\n"
+ "listdefault: list default keys\n"
+ " listdiff: list differences between current and default keys "
+ "(keys added, redefined or deleted)\n"
+ " context: name of context (\"default\" or \"search\")\n"
+ " bind: bind a command to a key or display command bound to "
+ "key (for context \"default\")\n"
+ " bindctxt: bind a command to a key or display command bound to "
+ "key, for given context\n"
+ " command: command (many commands can be separated by semicolons)\n"
+ " unbind: remove a key binding (for context \"default\")\n"
+ " unbindctxt: remove a key binding for given context\n"
+ " reset: reset a key to default binding (for context "
+ "\"default\")\n"
+ " resetctxt: reset a key to default binding, for given context\n"
+ " resetall: restore bindings to the default values and delete ALL "
+ "personal bindings (use carefully!)\n"
+ " missing: add missing keys (using default bindings), useful "
+ "after installing new WeeChat version\n"
+ "\n"
+ "When binding a command to a key, it is recommended to use key alt+k "
+ "(or Esc then k), and then press the key to bind: this will insert "
+ "key code in command line.\n"
+ "\n"
+ "For context \"mouse\" (possible in context \"cursor\" too), key has "
+ "format: \"@area:key\" or \"@area1>area2:key\" where area can be:\n"
+ " *: any area on screen\n"
+ " chat: chat area (any buffer)\n"
+ " chat(xxx): char area for buffer with name \"xxx\" (full name "
+ "including plugin)\n"
+ " bar(*): any bar\n"
+ " bar(xxx): bar \"xxx\"\n"
+ " item(*): any bar item\n"
+ " item(xxx): bar item \"xxx\"\n"
+ "The key can start or end with '*' to match many mouse events.\n"
+ "A special value for command with format \"hsignal:name\" can be "
+ "used for context mouse, this will send the hsignal \"name\" with "
+ "the focus hashtable as argument.\n"
+ "Another special value \"-\" can be used to disable key (it will be "
+ "ignored when looking for keys).\n"
+ "\n"
+ "Examples:\n"
+ " key alt-x to toggle nicklist bar:\n"
+ " /key bind meta-x /bar toggle nicklist\n"
+ " key alt-r to jump to #weechat IRC channel:\n"
+ " /key bind meta-r /buffer #weechat\n"
+ " restore default binding for key alt-r:\n"
+ " /key reset meta-r\n"
+ " key \"tab\" to stop search in buffer:\n"
+ " /key bindctxt search ctrl-I /input search_stop\n"
+ " middle button of mouse on a nick to retrieve info on nick:\n"
+ " /key bindctxt mouse @item(buffer_nicklist):button3 "
+ "/msg nickserv info ${nick}"),
+ "list %(keys_contexts)"
+ " || listdefault %(keys_contexts)"
+ " || listdiff %(keys_contexts)"
+ " || bind %(keys_codes) %(commands)"
+ " || bindctxt %(keys_contexts) %(keys_codes) %(commands)"
+ " || unbind %(keys_codes)"
+ " || unbindctxt %(keys_contexts) %(keys_codes)"
+ " || reset %(keys_codes_for_reset)"
+ " || resetctxt %(keys_contexts) %(keys_codes_for_reset)"
+ " || resetall %- %(keys_contexts)"
+ " || missing %(keys_contexts)",
+ &command_key, NULL);
+ hook_command (
+ NULL, "layout",
+ N_("manage buffers/windows layouts"),
+ N_("store [<name>] [buffers|windows]"
+ " || apply [<name>] [buffers|windows]"
+ " || leave"
+ " || del [<name>] [buffers|windows]"
+ " || rename <name> <new_name>"),
+ N_(" store: store current buffers/windows in a layout\n"
+ " apply: apply saved layout\n"
+ " leave: leave current layout (does not update any layout)\n"
+ " del: delete buffers and/or windows in a saved layout\n"
+ " (if neither \"buffers\" nor \"windows\" is given after "
+ "the name, the layout is deleted)\n"
+ " rename: rename a layout\n"
+ " name: name for saved layout (default is \"default\")\n"
+ "buffers: save/apply only buffers (order of buffers)\n"
+ "windows: save/apply only windows (buffer displayed by each window)\n"
+ "\n"
+ "Without argument, this command displays saved layouts."),
+ "store %(layouts_names)|buffers|windows buffers|windows"
+ " || apply %(layouts_names)|buffers|windows buffers|windows"
+ " || leave"
+ " || del %(layouts_names)|buffers|windows buffers|windows"
+ " || rename %(layouts_names) %(layouts_names)",
+ &command_layout, NULL);
+ hook_command (
+ NULL, "mouse",
+ N_("mouse control"),
+ N_("enable|disable|toggle [<delay>]"),
+ N_(" enable: enable mouse\n"
+ "disable: disable mouse\n"
+ " toggle: toggle mouse\n"
+ " delay: delay (in seconds) after which initial mouse state is "
+ "restored (useful to temporarily disable mouse)\n"
+ "\n"
+ "The mouse state is saved in option \"weechat.look.mouse\".\n"
+ "\n"
+ "Examples:\n"
+ " enable mouse:\n"
+ " /mouse enable\n"
+ " toggle mouse for 5 seconds:\n"
+ " /mouse toggle 5"),
+ "enable|disable|toggle",
+ &command_mouse, NULL);
+ hook_command (
+ NULL, "mute",
+ N_("execute a command silently"),
+ N_("[-current | -buffer <name> | -all] command"),
+ N_("-current: no output on current buffer\n"
+ " -buffer: no output on specified buffer\n"
+ " name: full buffer name (examples: \"irc.server.freenode\", "
+ "\"irc.freenode.#weechat\")\n"
+ " -all: no output on ALL buffers\n"
+ " command: command to execute silently (a '/' is automatically added "
+ "if not found at beginning of command)\n"
+ "\n"
+ "If no target is specified (-current, -buffer or -all), then default "
+ "is to mute WeeChat core buffer only.\n"
+ "\n"
+ "Examples:\n"
+ " config save:\n"
+ " /mute save\n"
+ " message to current IRC channel:\n"
+ " /mute -current msg * hi!\n"
+ " message to #weechat channel:\n"
+ " /mute -buffer irc.freenode.#weechat msg #weechat hi!"),
+ "-current %(commands)|%*"
+ " || -buffer %(buffers_plugins_names) %(commands)|%*"
+ " || -all %(commands)|%*"
+ " || %(commands)|%*",
+ &command_mute, NULL);
+ hook_command (
+ NULL, "plugin",
+ N_("list/load/unload plugins"),
+ N_("list|listfull [<name>]"
+ " || load <filename> [<arguments>]"
+ " || autoload [<arguments>]"
+ " || reload [<name> [<arguments>]]"
+ " || 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 a plugin (if no name given, unload all plugins, "
+ "then autoload plugins)\n"
+ " unload: unload a plugin (if no name given, unload all plugins)\n"
+ " filename: plugin (file) to load\n"
+ " name: a plugin name\n"
+ "arguments: arguments given to plugin on load\n"
+ "\n"
+ "Without argument, this command lists loaded plugins."),
+ "list %(plugins_names)"
+ " || listfull %(plugins_names)"
+ " || load %(plugins_installed)"
+ " || autoload"
+ " || reload %(plugins_names)"
+ " || unload %(plugins_names)",
+ &command_plugin, NULL);
+ hook_command (
+ NULL, "proxy",
+ N_("manage proxies"),
+ 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"
+ "\n"
+ "Examples:\n"
+ " create a http proxy, running on local host, port 8888:\n"
+ " /proxy add local http 127.0.0.1 8888\n"
+ " create a http proxy using IPv6 protocol:\n"
+ " /proxy add local http ::1 8888\n"
+ " /proxy set local ipv6 on\n"
+ " create a socks5 proxy with username/password:\n"
+ " /proxy add myproxy socks5 sample.host.org 3128 myuser mypass\n"
+ " delete a proxy:\n"
+ " /proxy del myproxy"),
+ "list"
+ " || add %(proxies_names) http|socks4|socks5"
+ " || del %(proxies_names)"
+ " || set %(proxies_names) %(proxies_options)",
+ &command_proxy, NULL);
+ hook_command (
+ NULL, "quit",
+ N_("quit WeeChat"),
+ N_("[-yes] [<arguments>]"),
+ N_(" -yes: required if option weechat.look.confirm_quit is enabled\n"
+ "arguments: text sent with signal \"quit\"\n"
+ " (for example irc plugin uses this text to send quit "
+ "message to server)"),
+ "",
+ &command_quit, NULL);
+ hook_command (
+ NULL, "reload",
+ N_("reload configuration files from disk"),
+ 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, "repeat",
+ N_("execute a command several times"),
+ N_("[-interval <delay>] <count> <command>"),
+ N_(" delay: delay between execution of commands (in milliseconds)\n"
+ " count: number of times to execute command\n"
+ "command: command to execute (a '/' is automatically added if not "
+ "found at beginning of command)\n"
+ "\n"
+ "All commands are executed on buffer where this command was issued.\n"
+ "\n"
+ "Example:\n"
+ " scroll 2 pages up:\n"
+ " /repeat 2 /window page_up"),
+ "%- %(commands)",
+ &command_repeat, NULL);
+ hook_command (
+ NULL, "save",
+ N_("save configuration files to disk"),
+ 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, "secure",
+ N_("manage secured data (passwords or private data encrypted in file "
+ "sec.conf)"),
+ N_("passphrase <passphrase>|-delete"
+ " || decrypt <passphrase>|-discard"
+ " || set <name> <value>"
+ " || del <name>"),
+ N_("passphrase: change the passphrase (without passphrase, data is "
+ "stored as plain text in file sec.conf)\n"
+ " -delete: delete passphrase\n"
+ " decrypt: decrypt data still encrypted (it happens only if "
+ "passphrase was not given on startup)\n"
+ " -discard: discard all data still encrypted\n"
+ " set: add or change secured data\n"
+ " del: delete secured data\n"
+ "\n"
+ "Without argument, this command displays secured data in a new "
+ "buffer.\n"
+ "\n"
+ "When a passphrase is used (data encrypted), it is asked by WeeChat "
+ "on startup.\n"
+ "It is possible to set environment variable \"WEECHAT_PASSPHRASE\" "
+ "to prevent the prompt (this same variable is used by WeeChat on "
+ "/upgrade).\n"
+ "\n"
+ "Secured data with format ${sec.data.xxx} can be used in:\n"
+ " - command line argument \"--run-command\"\n"
+ " - options weechat.startup.command_{before|after}_plugins\n"
+ " - proxy options: username, password\n"
+ " - irc server options: autojoin, command, password, "
+ "sasl_{username|password}\n"
+ " - option relay.network.password\n"
+ " - command /eval.\n"
+ "\n"
+ "Examples:\n"
+ " set a passphrase:\n"
+ " /secure passphrase this is my passphrase\n"
+ " encrypt freenode SASL password:\n"
+ " /secure set freenode mypassword\n"
+ " /set irc.server.freenode.sasl_password \"${sec.data.freenode}\"\n"
+ " encrypt oftc password for nickserv:\n"
+ " /secure set oftc mypassword\n"
+ " /set irc.server.oftc.command \"/msg nickserv identify "
+ "${sec.data.oftc}\"\n"
+ " alias to ghost the nick \"mynick\":\n"
+ " /alias ghost /eval /msg -server freenode nickserv ghost mynick "
+ "${sec.data.freenode}"),
+ "passphrase -delete"
+ " || decrypt -discard"
+ " || set %(secured_data)"
+ " || del %(secured_data)",
+ &command_secure, NULL);
+ hook_command (
+ NULL, "set",
+ N_("set config options"),
+ N_("[<option> [<value>]] || diff [<option> [<option>...]]"),
+ N_("option: name of an option (can start or end with '*' to list many "
+ "options)\n"
+ " value: new value for option\n"
+ " diff: display only changed options\n"
+ "\n"
+ "New value can be, according to variable type:\n"
+ " boolean: on, off or toggle\n"
+ " integer: number, ++number or --number\n"
+ " string: any string (\"\" for empty string)\n"
+ " 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.\n"
+ "\n"
+ "Examples:\n"
+ " display options about highlight:\n"
+ " /set *highlight*\n"
+ " add a word to highlight:\n"
+ " /set weechat.look.highlight \"word\"\n"
+ " display changed options:\n"
+ " /set diff\n"
+ " display changed options in irc plugin:\n"
+ " /set diff irc.*"),
+ "%(config_options) %(config_option_values)"
+ " || diff %(config_options)|%*",
+ &command_set, NULL);
+ hook_command (
+ NULL, "unset",
+ N_("unset/reset config options"),
+ 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).\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>|-quit]"),
+ N_("path_to_binary: path to WeeChat binary (default is current binary)\n"
+ " -dummy: do nothing (option used to prevent accidental "
+ "completion with \"-quit\")\n"
+ " -quit: close *ALL* connections, save session and quit "
+ "WeeChat, which makes possible a delayed restoration (see below)\n"
+ "\n"
+ "This command upgrades and reloads a running WeeChat session. The "
+ "new WeeChat binary must have been compiled or installed with a "
+ "package manager before running this command.\n"
+ "\n"
+ "Note: SSL connections are lost during upgrade, because reload of "
+ "SSL sessions is currently not possible with GnuTLS. There is "
+ "automatic reconnection after upgrade.\n"
+ "\n"
+ "Upgrade process has 4 steps:\n"
+ " 1. save session into files for core and plugins (buffers, "
+ "history, ..)\n"
+ " 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.\n"
+ "\n"
+ "With option \"-quit\", the process is slightly different:\n"
+ " 1. close *ALL* connections (irc, xfer, relay, ...)\n"
+ " 2. save session into files (*.upgrade)\n"
+ " 3. unload all plugins\n"
+ " 4. save WeeChat configuration\n"
+ " 5. quit WeeChat\n"
+ "Then later you can restore session with command: weechat --upgrade\n"
+ "IMPORTANT: you must restore the session with exactly same "
+ "configuration (files *.conf).\n"
+ "It is possible to restore WeeChat session on another machine if you "
+ "copy the content of directory \"~/.weechat\"."),
+ "%(filename)|-dummy|-quit",
+ &command_upgrade, NULL);
+ hook_command (
+ NULL, "uptime",
+ N_("show WeeChat uptime"),
+ "[-o | -ol]",
+ N_(" -o: send uptime to current buffer as input (english string)\n"
+ "-ol: send uptime to current buffer as input (translated string)"),
+ "-o|-ol",
+ &command_uptime, NULL);
+ hook_command (
+ NULL, "version",
+ N_("show WeeChat version and compilation date"),
+ "[-o | -ol]",
+ N_(" -o: send version to current buffer as input (english string)\n"
+ "-ol: send version to current buffer as input (translated string)"),
+ "-o|-ol",
+ &command_version, NULL);
+ hook_command (
+ NULL, "wait",
+ N_("schedule a command execution in future"),
+ N_("<number>[<unit>] <command>"),
+ N_(" number: amount of time to wait (integer number)\n"
+ " unit: optional, values are:\n"
+ " ms: milliseconds\n"
+ " s: seconds (default)\n"
+ " m: minutes\n"
+ " h: hours\n"
+ "command: command to execute (or text to send to buffer if command "
+ "does not start with '/')\n"
+ "\n"
+ "Note: command is executed on buffer where /wait was executed (if "
+ "buffer is not found (for example if it has been closed before "
+ "execution of command), then command is executed on WeeChat core "
+ "buffer).\n"
+ "\n"
+ "Examples:\n"
+ " join channel in 10 seconds:\n"
+ " /wait 10 /join #test\n"
+ " set away in 15 minutes:\n"
+ " /wait 15m /away -all I'm away\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 [-window <number>]"
+ " || <number>"
+ " || splith|splitv [-window <number>] [<pct>]"
+ " || resize [-window <number>] [+/-]<pct>"
+ " || balance"
+ " || merge [-window <number>] [all]"
+ " || page_up|page_down [-window <number>]"
+ " || refresh"
+ " || scroll [-window <number>] [+/-]<value>[s|m|h|d|M|y]"
+ " || scroll_horiz [-window <number>] [+/-]<value>[%]"
+ " || scroll_up|scroll_down|scroll_top|scroll_bottom|"
+ "scroll_beyond_end|scroll_previous_highlight|scroll_next_highlight|"
+ "scroll_unread [-window <number>]"
+ " || swap [-window <number>] [up|down|left|right]"
+ " || zoom[-window <number>]"),
+ N_(" list: list opened windows (without argument, this list is "
+ "displayed)\n"
+ " -1: jump to previous window\n"
+ " +1: jump to next window\n"
+ " b#: jump to next window displaying buffer number #\n"
+ " up: switch to window above current one\n"
+ " down: switch to window below current one\n"
+ " left: switch to window on the left\n"
+ " right: switch to window on the right\n"
+ " number: window number (see /window list)\n"
+ " splith: split current window horizontally\n"
+ " splitv: split current window vertically\n"
+ " resize: resize window size, new size is <pct> percentage of "
+ "parent window\n"
+ " balance: balance the sizes of all windows\n"
+ " merge: merge window with another (all = keep only one "
+ "window)\n"
+ " page_up: scroll one page up\n"
+ " page_down: scroll one page down\n"
+ " refresh: refresh screen\n"
+ " scroll: scroll a number of lines (+/-N) or with time: "
+ "s=seconds, m=minutes, h=hours, d=days, M=months, y=years\n"
+ " scroll_horiz: scroll horizontally a number of columns (+/-N) or "
+ "percentage of window size (this scrolling is possible only on "
+ "buffers with free content)\n"
+ " scroll_up: scroll a few lines up\n"
+ " scroll_down: scroll a few lines down\n"
+ " scroll_top: scroll to top of buffer\n"
+ "scroll_bottom: scroll to bottom of buffer\n"
+ "scroll_beyond_end: scroll beyond the end of buffer\n"
+ "scroll_previous_highlight: scroll to previous highlight\n"
+ "scroll_next_highlight: scroll to next highlight\n"
+ "scroll_unread: scroll to unread marker\n"
+ " swap: swap buffers of two windows (with optional direction "
+ "for target window)\n"
+ " zoom: zoom on window\n"
+ "\n"
+ "For splith and splitv, pct is a percentage which represents size of "
+ "new window, computed with current window as size reference. For "
+ "example 25 means create a new window with size = current_size / 4\n"
+ "\n"
+ "Examples:\n"
+ " jump to window displaying buffer #1:\n"
+ " /window b1\n"
+ " scroll 2 lines up:\n"
+ " /window scroll -2\n"
+ " scroll 2 days up:\n"
+ " /window scroll -2d\n"
+ " scroll to beginning of current day:\n"
+ " /window scroll -d\n"
+ " zoom on window #2:\n"
+ " /window zoom -window 2"),
+ "list"
+ " || -1 -window %(windows_numbers)"
+ " || +1 -window %(windows_numbers)"
+ " || up -window %(windows_numbers)"
+ " || down -window %(windows_numbers)"
+ " || left -window %(windows_numbers)"
+ " || right -window %(windows_numbers)"
+ " || splith -window %(windows_numbers)"
+ " || splitv -window %(windows_numbers)"
+ " || resize -window %(windows_numbers)"
+ " || balance"
+ " || page_up -window %(windows_numbers)"
+ " || page_down -window %(windows_numbers)"
+ " || refresh"
+ " || scroll -window %(windows_numbers)"
+ " || scroll_horiz -window %(windows_numbers)"
+ " || scroll_up -window %(windows_numbers)"
+ " || scroll_down -window %(windows_numbers)"
+ " || scroll_top -window %(windows_numbers)"
+ " || scroll_bottom -window %(windows_numbers)"
+ " || scroll_beyond_end -window %(windows_numbers)"
+ " || scroll_previous_highlight -window %(windows_numbers)"
+ " || scroll_next_highlight -window %(windows_numbers)"
+ " || scroll_unread -window %(windows_numbers)"
+ " || swap up|down|left|right|-window %(windows_numbers)"
+ " || zoom -window %(windows_numbers)"
+ " || merge all|-window %(windows_numbers)"
+ " || %(windows_numbers)",
+ &command_window, NULL);
}
/*
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index edf8d79d1..affe64223 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -983,53 +983,52 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
alias_config_read ();
- weechat_hook_command ("alias",
- N_("create an alias for a command"),
- N_("[-completion <completion>] <alias> [<command> "
- "[;<command>...]]"),
- N_("completion: completion for alias (optional, by "
- "default completion is done with target "
- "command)\n"
- " note: you can use %%command to use "
- "completion of an existing command\n"
- " alias: name of alias (can start or end "
- "with \"*\" for alias listing)\n"
- " command: command name with arguments (many "
- "commands can be separated by semicolons)\n\n"
- "Without argument, this command lists all "
- "defined alias.\n\n"
- "Note: in command, special variables "
- "are replaced:\n"
- " $n: argument 'n' (between 1 and 9)\n"
- " $-m: arguments from 1 to 'm'\n"
- " $n-: arguments from 'n' to last\n"
- " $n-m: arguments from 'n' to 'm'\n"
- " $*: all arguments\n"
- " $~: last argument\n"
- " $var: where \"var\" is a local variable of "
- "buffer (see /buffer localvar)\n"
- " examples: $nick, $channel, $server, "
- "$plugin, $name\n\n"
- "To remove an alias, use command /unalias.\n\n"
- "Examples:\n"
- " alias /split to split window horizontally:\n"
- " /alias split /window splith\n"
- " alias /hello to say \"hello\" on all channels "
- "but not on #weechat:\n"
- " /alias hello /allchan -exclude=#weechat msg "
- "* hello\n"
- " alias /forcejoin to send IRC command "
- "\"forcejoin\" with completion of /sajoin:\n"
- " /alias -completion %%sajoin forcejoin /quote forcejoin"),
- "-completion %- %(alias) %(commands)|%(alias_value)"
- " || %(alias) %(commands)|%(alias_value)",
- &alias_command_cb, NULL);
-
- weechat_hook_command ("unalias", N_("remove aliases"),
- N_("<alias> [<alias>...]"),
- N_("alias: name of alias to remove"),
- "%(alias)|%*",
- &unalias_command_cb, NULL);
+ weechat_hook_command (
+ "alias",
+ N_("create an alias for a command"),
+ N_("[-completion <completion>] <alias> [<command> [;<command>...]]"),
+ N_("completion: completion for alias (optional, by default completion "
+ "is done with target command)\n"
+ " note: you can use %%command to use completion of an "
+ "existing command\n"
+ " alias: name of alias (can start or end with \"*\" for alias "
+ "listing)\n"
+ " command: command name with arguments (many commands can be "
+ "separated by semicolons)\n"
+ "\n"
+ "Without argument, this command lists all defined alias.\n"
+ "\n"
+ "Note: in command, special variables are replaced:\n"
+ " $n: argument 'n' (between 1 and 9)\n"
+ " $-m: arguments from 1 to 'm'\n"
+ " $n-: arguments from 'n' to last\n"
+ " $n-m: arguments from 'n' to 'm'\n"
+ " $*: all arguments\n"
+ " $~: last argument\n"
+ " $var: where \"var\" is a local variable of buffer (see "
+ "/buffer localvar)\n"
+ " examples: $nick, $channel, $server, $plugin, $name\n"
+ "\n"
+ "To remove an alias, use command /unalias.\n"
+ "\n"
+ "Examples:\n"
+ " alias /split to split window horizontally:\n"
+ " /alias split /window splith\n"
+ " alias /hello to say \"hello\" on all channels but not on "
+ "#weechat:\n"
+ " /alias hello /allchan -exclude=#weechat msg * hello\n"
+ " alias /forcejoin to send IRC command \"forcejoin\" with "
+ "completion of /sajoin:\n"
+ " /alias -completion %%sajoin forcejoin /quote forcejoin"),
+ "-completion %- %(alias) %(commands)|%(alias_value)"
+ " || %(alias) %(commands)|%(alias_value)",
+ &alias_command_cb, NULL);
+ weechat_hook_command (
+ "unalias", N_("remove aliases"),
+ N_("<alias> [<alias>...]"),
+ N_("alias: name of alias to remove"),
+ "%(alias)|%*",
+ &unalias_command_cb, NULL);
weechat_hook_completion ("alias", N_("list of aliases"),
&alias_completion_cb, NULL);
diff --git a/src/plugins/aspell/weechat-aspell-command.c b/src/plugins/aspell/weechat-aspell-command.c
index 3dfb12d48..ccc5dc3c6 100644
--- a/src/plugins/aspell/weechat-aspell-command.c
+++ b/src/plugins/aspell/weechat-aspell-command.c
@@ -458,40 +458,38 @@ weechat_aspell_command_cb (void *data, struct t_gui_buffer *buffer,
void
weechat_aspell_command_init ()
{
- weechat_hook_command ("aspell",
- N_("aspell plugin configuration"),
- N_("enable|disable|toggle"
- " || listdict"
- " || setdict <dict>[,<dict>...]"
- " || deldict"
- " || addword [<dict>] <word>"),
- N_(" enable: enable aspell\n"
- " disable: disable aspell\n"
- " toggle: toggle aspell\n"
- "listdict: show installed dictionaries\n"
- " setdict: set dictionary for current buffer "
- "(multiple dictionaries can be separated by a "
- "comma)\n"
- " deldict: delete dictionary used on current "
- "buffer\n"
- " addword: add a word in personal aspell "
- "dictionary\n"
- "\n"
- "Input line beginning with a '/' is not checked, "
- "except for some commands (see /set "
- "aspell.check.commands).\n\n"
- "To enable aspell on all buffers, use option "
- "\"default_dict\", then enable aspell, for "
- "example:\n"
- " /set aspell.check.default_dict \"en\"\n"
- " /aspell enable\n\n"
- "Default key to toggle aspell is alt-s."),
- "enable"
- " || disable"
- " || toggle"
- " || listdict"
- " || setdict %(aspell_dicts)"
- " || deldict"
- " || addword",
- &weechat_aspell_command_cb, NULL);
+ weechat_hook_command (
+ "aspell",
+ N_("aspell plugin configuration"),
+ N_("enable|disable|toggle"
+ " || listdict"
+ " || setdict <dict>[,<dict>...]"
+ " || deldict"
+ " || addword [<dict>] <word>"),
+ N_(" enable: enable aspell\n"
+ " disable: disable aspell\n"
+ " toggle: toggle aspell\n"
+ "listdict: show installed dictionaries\n"
+ " setdict: set dictionary for current buffer (multiple dictionaries "
+ "can be separated by a comma)\n"
+ " deldict: delete dictionary used on current buffer\n"
+ " addword: add a word in personal aspell dictionary\n"
+ "\n"
+ "Input line beginning with a '/' is not checked, except for some "
+ "commands (see /set aspell.check.commands).\n"
+ "\n"
+ "To enable aspell on all buffers, use option \"default_dict\", then "
+ "enable aspell, for example:\n"
+ " /set aspell.check.default_dict \"en\"\n"
+ " /aspell enable\n"
+ "\n"
+ "Default key to toggle aspell is alt-s."),
+ "enable"
+ " || disable"
+ " || toggle"
+ " || listdict"
+ " || setdict %(aspell_dicts)"
+ " || deldict"
+ " || addword",
+ &weechat_aspell_command_cb, NULL);
}
diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c
index 3824f9db6..63a0ebc68 100644
--- a/src/plugins/charset/charset.c
+++ b/src/plugins/charset/charset.c
@@ -584,16 +584,17 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
charset_config_read ();
/* /charset command */
- weechat_hook_command ("charset",
- N_("change charset for current buffer"),
- N_("decode|encode <charset>"
- " || reset"),
- N_(" decode: change decoding charset\n"
- " encode: change encoding charset\n"
- "charset: new charset for current buffer\n"
- " reset: reset charsets for current buffer"),
- "decode|encode|reset",
- &charset_command_cb, NULL);
+ weechat_hook_command (
+ "charset",
+ N_("change charset for current buffer"),
+ N_("decode|encode <charset>"
+ " || reset"),
+ N_(" decode: change decoding charset\n"
+ " encode: change encoding charset\n"
+ "charset: new charset for current buffer\n"
+ " reset: reset charsets for current buffer"),
+ "decode|encode|reset",
+ &charset_command_cb, NULL);
/* modifiers hooks */
weechat_hook_modifier ("charset_decode", &charset_decode_cb, NULL);
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 92601bb05..a9046ed85 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -5793,712 +5793,732 @@ irc_command_whowas (void *data, struct t_gui_buffer *buffer, int argc,
void
irc_command_init ()
{
- weechat_hook_command ("admin",
- N_("find information about the administrator of the "
- "server"),
- 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: execute command for channels of "
- "current server only\n"
- " -exclude: exclude some channels ('*' is "
- "allowed at beginning or end of channel name, to "
- "exclude many channels)\n"
- " command: command to execute\n"
- "arguments: arguments for command (special variables "
- "$nick, $channel and $server are replaced by their "
- "value)\n\n"
- "Examples:\n"
- " execute '/me is testing' on all channels:\n"
- " /allchan me is testing\n"
- " say 'hello' everywhere but not on #weechat:\n"
- " /allchan -exclude=#weechat msg * hello\n"
- " say 'hello' everywhere but not on #weechat "
- "and channels beginning with #linux:\n"
- " /allchan -exclude=#weechat,#linux* msg * hello"),
- 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: exclude some servers ('*' is "
- "allowed at beginning or end of server name, to "
- "exclude many servers)\n"
- " command: command to execute\n"
- "arguments: arguments for command (special variables "
- "$nick, $channel and $server are replaced by their "
- "value)\n\n"
- "Examples:\n"
- " change nick on all servers:\n"
- " /allserv nick newnick\n"
- " set away on all servers:\n"
- " /allserv away I'm away\n"
- " do a whois on my nick on all servers:\n"
- " /allserv whois $nick"),
- NULL, &irc_command_allserv, NULL);
+ weechat_hook_command (
+ "admin",
+ N_("find information about the administrator of the server"),
+ 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: execute command for channels of current server only\n"
+ " -exclude: exclude some channels ('*' is allowed at beginning or "
+ "end of channel name, to exclude many channels)\n"
+ " command: command to execute\n"
+ "arguments: arguments for command (special variables $nick, $channel "
+ "and $server are replaced by their value)\n"
+ "\n"
+ "Examples:\n"
+ " execute '/me is testing' on all channels:\n"
+ " /allchan me is testing\n"
+ " say 'hello' everywhere but not on #weechat:\n"
+ " /allchan -exclude=#weechat msg * hello\n"
+ " say 'hello' everywhere but not on #weechat and channels beginning "
+ "with #linux:\n"
+ " /allchan -exclude=#weechat,#linux* msg * hello"),
+ 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: exclude some servers ('*' is allowed at beginning or end "
+ "of server name, to exclude many servers)\n"
+ " command: command to execute\n"
+ "arguments: arguments for command (special variables $nick, $channel "
+ "and $server are replaced by their value)\n"
+ "\n"
+ "Examples:\n"
+ " change nick on all servers:\n"
+ " /allserv nick newnick\n"
+ " set away on all servers:\n"
+ " /allserv away I'm away\n"
+ " do a whois on my nick on all servers:\n"
+ " /allserv whois $nick"),
+ NULL, &irc_command_allserv, NULL);
weechat_hook_command_run ("/away", &irc_command_run_away, NULL);
- weechat_hook_command ("ban",
- N_("ban nicks or hosts"),
- N_("[<channel>] [<nick> [<nick>...]]"),
- N_("channel: channel for ban\n"
- " nick: user or host to ban\n\n"
- "Without argument, this command display ban list "
- "for current channel."),
- "%(irc_channel_nicks_hosts)", &irc_command_ban, NULL);
- weechat_hook_command ("connect",
- N_("connect to IRC server(s)"),
- N_("<server> [<server>...] [-<option>[=<value>]] "
- "[-no<option>] [-nojoin] [-switch]"
- " || -all|-auto|-open [-nojoin] [-switch]"),
- N_(" server: server name, which can be:\n"
- " - internal server name (created by "
- "/server add, recommended usage)\n"
- " - hostname/port or IP/port (this "
- "will create a TEMPORARY server), port is 6667 "
- "by default\n"
- " - URL with format: "
- "irc[6][s]://[nickname[:password]@]"
- "irc.example.org[:port][/#channel1][,#channel2[...]]\n"
- " option: set option for server (for boolean "
- "option, value can be omitted)\n"
- " nooption: set boolean option to 'off' (for "
- "example: -nossl)\n"
- " -all: connect to all servers defined in "
- "configuration\n"
- " -auto: connect to servers with autoconnect "
- "enabled\n"
- " -open: connect to all opened servers that "
- "are not currently connected\n"
- " -nojoin: do not join any channel (even if "
- "autojoin is enabled on server)\n"
- " -switch: switch to next server address\n\n"
- "To disconnect from a server or stop any connection "
- "attempt, use command /disconnect.\n\n"
- "Examples:\n"
- " /connect freenode\n"
- " /connect irc.oftc.net/6667\n"
- " /connect irc6.oftc.net/6667 -ipv6\n"
- " /connect irc6.oftc.net/6697 -ipv6 -ssl\n"
- " /connect my.server.org/6697 -ssl -password=test\n"
- " /connect irc://nick@irc.oftc.net/#channel\n"
- " /connect -switch"),
- "%(irc_servers)|-all|-auto|-open|-nojoin|-switch|%*",
- &irc_command_connect, NULL);
- weechat_hook_command ("ctcp",
- N_("send a CTCP message (Client-To-Client Protocol)"),
- N_("<target> <type> [<arguments>]"),
- N_(" target: nick or channel to send CTCP to\n"
- " type: CTCP type (examples: \"version\", "
- "\"ping\", ..)\n"
- "arguments: arguments for CTCP"),
- "%(irc_channel)|%(nicks) "
- "action|clientinfo|finger|ping|source|time|userinfo|"
- "version",
- &irc_command_ctcp, NULL);
- weechat_hook_command ("cycle",
- N_("leave and rejoin a channel"),
- 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 a DCC (file transfer 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"
- " send file \"/home/foo/bar.txt\" to nick \"toto\":\n"
- " /dcc send toto /home/foo/bar.txt"),
- "chat %(nicks)"
- " || send %(nicks) %(filename)",
- &irc_command_dcc, NULL);
- weechat_hook_command ("dehalfop",
- N_("remove channel half-operator status from "
- "nick(s)"),
- N_("<nick> [<nick>...]"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: remove channel half-operator status from "
- "everybody on channel except yourself"),
- "%(nicks)", &irc_command_dehalfop, NULL);
- weechat_hook_command ("deop",
- N_("remove channel operator status from "
- "nick(s)"),
- N_("<nick> [<nick>...] || * -yes"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: remove channel operator status from "
- "everybody on channel except yourself"),
- "%(nicks)|%*", &irc_command_deop, NULL);
- weechat_hook_command ("devoice",
- N_("remove voice from nick(s)"),
- N_("<nick> [<nick>...] || * -yes"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: remove voice from everybody on channel"),
- "%(nicks)|%*", &irc_command_devoice, NULL);
- weechat_hook_command ("die",
- N_("shutdown the server"),
- N_("[<target>]"),
- N_("target: server name"),
- NULL, &irc_command_die, NULL);
- weechat_hook_command ("disconnect",
- N_("disconnect from one or all IRC servers"),
- N_("[<server>|-all|-pending [<reason>]]"),
- N_(" server: server name to disconnect\n"
- " -all: disconnect from all servers\n"
- "-pending: cancel auto-reconnection on servers "
- "currently reconnecting\n"
- " reason: reason for quit"),
- "%(irc_servers)|-all|-pending",
- &irc_command_disconnect, NULL);
- weechat_hook_command ("halfop",
- N_("give channel half-operator status to "
- "nick(s)"),
- N_("<nick> [<nick>...] || * -yes"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: give channel half-operator status to "
- "everybody on channel"),
- "%(nicks)", &irc_command_halfop, NULL);
- weechat_hook_command ("ignore",
- N_("ignore nicks/hosts from servers or channels"),
- 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 a POSIX "
- "extended regular expression if \"re:\" is given "
- "or a mask using \"*\" to replace one or more "
- "chars)\n"
- " del: delete an ignore\n"
- " number: number of ignore to delete (look at "
- "list to find it)\n"
- " -all: delete all ignores\n"
- " server: internal server name where ignore "
- "is working\n"
- " channel: channel name where ignore is "
- "working\n\n"
- "Note: the regular expression can start with "
- "\"(?-i)\" to become case sensitive.\n\n"
- "Examples:\n"
- " ignore nick \"toto\" everywhere:\n"
- " /ignore add toto\n"
- " ignore host \"toto@domain.com\" on freenode server:\n"
- " /ignore add toto@domain.com freenode\n"
- " ignore host \"toto*@*.domain.com\" on freenode/#weechat:\n"
- " /ignore add toto*@*.domain.com freenode #weechat"),
- "list"
- " || add %(irc_channel_nicks_hosts) %(irc_servers) %(irc_channels) %-"
- " || del -all|%(irc_ignores_numbers) %-",
- &irc_command_ignore, NULL);
- weechat_hook_command ("info",
- N_("get information describing the server"),
- N_("[<target>]"),
- N_("target: server name"),
- NULL, &irc_command_info, NULL);
- weechat_hook_command ("invite",
- N_("invite a nick on a channel"),
- N_("<nick> [<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 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_("[-noswitch] [-server <server>] "
- "[<channel1>[,<channel2>...]] [<key1>[,<key2>...]]"),
- N_("-noswitch: do not switch to new buffer\n"
- " server: send to this server (internal name)\n"
- " channel: channel name to join\n"
- " key: key to join the channel (channels with "
- "a key must be the first in list)\n\n"
- "Examples:\n"
- " /join #weechat\n"
- " /join #protectedchan,#weechat key\n"
- " /join -server freenode #weechat\n"
- " /join -noswitch #weechat"),
- "%(irc_channels)|-noswitch|-server|%(irc_servers)|%*",
- &irc_command_join, NULL);
- weechat_hook_command ("kick",
- N_("forcibly remove a user from a channel"),
- N_("[<channel>] <nick> [<reason>]"),
- N_("channel: channel where user is\n"
- " nick: nick to kick\n"
- " reason: reason for kick (special variables "
- "$nick, $channel and $server are replaced by their "
- "value)"),
- "%(nicks) %(irc_msg_kick) %-", &irc_command_kick, NULL);
- weechat_hook_command ("kickban",
- N_("kicks and bans a nick from a channel"),
- N_("[<channel>] <nick> [<reason>]"),
- N_("channel: channel where user is\n"
- " nick: nick to kick and ban\n"
- " reason: reason for kick (special variables "
- "$nick, $channel and $channel are replaced by their "
- "value)\n\n"
- "It is possible to kick/ban with a mask, nick "
- "will be extracted from mask and replaced by "
- "\"*\".\n\n"
- "Example:\n"
- " ban \"*!*@host.com\" and then kick \"toto\":\n"
- " /kickban toto!*@host.com"),
- "%(irc_channel_nicks_hosts) %(irc_msg_kick) %-",
- &irc_command_kickban, NULL);
- weechat_hook_command ("kill",
- N_("close client-server connection"),
- 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: this server should answer the "
- "query\n"
- "server_mask: list of servers must match this "
- "mask"),
- NULL, &irc_command_links, NULL);
- weechat_hook_command ("list",
- N_("list channels and their topic"),
- N_("[<channel>[,<channel>...]] [<server>] "
- "[-re <regex>]"),
- N_("channel: channel to list\n"
- " server: server name\n"
- " regex: POSIX extended regular expression used "
- "to filter results (case insensitive, can start "
- "by \"(?-i)\" to become case sensitive)\n\n"
- "Examples:\n"
- " list all channels on server (can be very slow "
- "on large networks):\n"
- " /list\n"
- " list channel #weechat:\n"
- " /list #weechat\n"
- " list all channels beginning with \"#weechat\" "
- "(can be very slow on large networks):\n"
- " /list -re #weechat.*"),
- NULL, &irc_command_list, NULL);
- weechat_hook_command ("lusers",
- N_("get statistics about the size of the IRC "
- "network"),
- N_("[<mask> [<target>]]"),
- N_(" mask: servers matching the mask only\n"
- "target: server for forwarding request"),
- NULL, &irc_command_lusers, NULL);
- weechat_hook_command ("map",
- N_("show a graphical map of the IRC network"),
- "",
- "",
- NULL, &irc_command_map, NULL);
- weechat_hook_command ("me",
- N_("send a CTCP action to the current channel"),
- 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|m|l|b|e|v|k "
- "[<arguments>] || <nick> [+|-]i|s|w|o"),
- N_("channel modes:\n"
- " channel: channel name to modify (default is "
- "current one)\n"
- " o: give/take channel operator privileges\n"
- " p: private channel flag\n"
- " s: secret channel flag\n"
- " i: invite-only channel flag\n"
- " t: topic settable by channel operator only "
- "flag\n"
- " n: no messages to channel from clients on the "
- "outside\n"
- " m: moderated channel\n"
- " l: set the user limit to channel\n"
- " b: set a ban mask to keep users out\n"
- " e: set exception mask\n"
- " v: give/take the ability to speak on a "
- "moderated channel\n"
- " k: set a channel key (password)\n"
- "user modes:\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\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 #weechat +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: 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: send to this server (internal name)\n"
- "target: nick or channel (may be mask, '*' = "
- "current channel)\n"
- " text: text to send"),
- "-server %(irc_servers)"
- " || %(nicks)",
- &irc_command_msg, NULL);
- weechat_hook_command ("names",
- 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 nick"),
- N_("[-all] <nick>"),
- N_("-all: set new nick for all connected "
- "servers\n"
- "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: send to this server (internal name)\n"
- "target: nick or channel\n"
- " text: text to send"),
- "%(nicks)|-server %(irc_servers)", &irc_command_notice, NULL);
- 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: add a notification\n"
- " nick: nick\n"
- "server: internal server name (by default "
- "current server)\n"
- " -away: notify when away message is changed "
- "(by doing whois on nick)\n"
- " del: delete a notification\n"
- " -all: delete all notifications\n\n"
- "Without argument, this command displays "
- "notifications for current server (or all servers "
- "if command is issued on core buffer).\n\n"
- "Examples:\n"
- " notify when \"toto\" joins/quits current "
- "server:\n"
- " /notify add toto\n"
- " notify when \"toto\" joins/quits freenode "
- "server:\n"
- " /notify add toto freenode\n"
- " notify when \"toto\" is away or back on "
- "freenode server:\n"
- " /notify add toto freenode -away"),
- "add %(irc_channel_nicks) %(irc_servers) "
- "-away %-"
- " || del -all|%(irc_notify_nicks) %(irc_servers) %-",
- &irc_command_notify, NULL);
- weechat_hook_command ("op",
- N_("give channel operator status to nick(s)"),
- N_("<nick> [<nick>...] || * -yes"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: give channel operator status to everybody "
- "on channel"),
- "%(nicks)|%*", &irc_command_op, NULL);
- weechat_hook_command ("oper",
- N_("get operator privileges"),
- 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>...]] [<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_("send a ping to server"),
- N_("<server1> [<server2>]"),
- N_("server1: server\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: 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>] <nick>[,<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 ("quiet",
- N_("quiet nicks or hosts"),
- N_("[<channel>] [<nick> [<nick>...]]"),
- N_("channel: channel for quiet\n"
- " nick: user or host to quiet\n\n"
- "Without argument, this command display quiet list "
- "for current channel."),
- "%(irc_channel_nicks_hosts)", &irc_command_quiet, NULL);
- weechat_hook_command ("quote",
- N_("send raw data to server without parsing"),
- 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_("<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"),
- "%(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: extra option, for some servers"),
- NULL, &irc_command_rehash, NULL);
- weechat_hook_command ("restart",
- N_("tell the server to restart itself"),
- N_("[<target>]"),
- N_("target: server name"),
- NULL, &irc_command_restart, NULL);
- weechat_hook_command ("sajoin",
- N_("force a user to join channel(s)"),
- 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"),
- N_("<channel> <mode>"),
- N_("channel: channel name\n"
- " mode: mode for channel"),
- "%(irc_server_channels)", &irc_command_samode, NULL);
- weechat_hook_command ("sanick",
- N_("force a user to use another nick"),
- N_("<nick> <new_nick>"),
- N_(" nick: nick\n"
- "new_nick: new nick"),
- "%(nicks) %(nicks)", &irc_command_sanick, NULL);
- weechat_hook_command ("sapart",
- N_("force a user to leave channel(s)"),
- N_("<nick> <channel>[,<channel>...]"),
- N_(" nick: nick\n"
- "channel: channel name"),
- "%(nicks) %(irc_server_channels)", &irc_command_sapart, NULL);
- weechat_hook_command ("saquit",
- N_("force a user to quit server with a 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_("<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|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 "
- "each server\n"
- " add: create a new server\n"
- " server: server name, for internal and "
- "display use\n"
- "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 "
- "option, value can be omitted)\n"
- "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 "
- "temporary servers only)\n"
- " 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"
- "Examples:\n"
- " /server listfull\n"
- " /server add oftc irc.oftc.net/6697 -ssl -autoconnect\n"
- " /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n"
- " /server add freenode2 chat.eu.freenode.net/6667,"
- "chat.us.freenode.net/6667\n"
- " /server add freenode3 irc.freenode.net -password=mypass\n"
- " /server copy oftc oftcbis\n"
- " /server rename oftc newoftc\n"
- " /server del freenode\n"
- " /server deloutq"),
- "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"
- " || raw",
- &irc_command_server, NULL);
- weechat_hook_command ("servlist",
- N_("list services currently connected to the "
- "network"),
- 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: name of service\n"
- " 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"
- "comment: comment for quit"),
- NULL, &irc_command_squit, NULL);
- weechat_hook_command ("stats",
- N_("query statistics about 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);
- weechat_hook_command ("summon",
- 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: username\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: query time from specified server"),
- NULL, &irc_command_time, NULL);
- weechat_hook_command ("topic",
- N_("get/set channel topic"),
- N_("[<channel>] [<topic>|-delete]"),
- N_("channel: channel name\n"
- " 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: server"),
- NULL, &irc_command_trace, NULL);
- weechat_hook_command ("unban",
- N_("unban nicks or hosts"),
- 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 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: server"),
- NULL, &irc_command_users, NULL);
- weechat_hook_command ("version",
- N_("give the version info of nick or server "
- "(current or specified)"),
- N_("[<server>|<nick>]"),
- N_("server: server name\n"
- " nick: nick"),
- "%(nicks)", &irc_command_version, NULL);
- weechat_hook_command ("voice",
- N_("give voice to nick(s)"),
- N_("<nick> [<nick>...]"),
- N_("nick: nick or mask (can start or end with \"*\" "
- "as wildcard)\n"
- " *: give voice to everybody on channel"),
- "%(nicks)|%*", &irc_command_voice, NULL);
- weechat_hook_command ("wallchops",
- N_("send a notice to channel ops"),
- 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: 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: 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>] [<nick>[,<nick>...]]"),
- N_("server: server name\n"
- " nick: nick (may be a mask)\n\n"
- "Without argument, this command will do a whois on:\n"
- "- your own nick if buffer is a server/channel\n"
- "- remote nick if buffer is a private."),
- "%(nicks)", &irc_command_whois, NULL);
- weechat_hook_command ("whowas",
- N_("ask for information about a nick which no "
- "longer exists"),
- 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"),
- "%(nicks)", &irc_command_whowas, NULL);
+ weechat_hook_command (
+ "ban",
+ N_("ban nicks or hosts"),
+ N_("[<channel>] [<nick> [<nick>...]]"),
+ N_("channel: channel for ban\n"
+ " nick: user or host to ban\n"
+ "\n"
+ "Without argument, this command display ban list for current channel."),
+ "%(irc_channel_nicks_hosts)", &irc_command_ban, NULL);
+ weechat_hook_command (
+ "connect",
+ N_("connect to IRC server(s)"),
+ N_("<server> [<server>...] [-<option>[=<value>]] [-no<option>] "
+ "[-nojoin] [-switch]"
+ " || -all|-auto|-open [-nojoin] [-switch]"),
+ N_(" server: server name, which can be:\n"
+ " - internal server name (created by /server add, "
+ "recommended usage)\n"
+ " - hostname/port or IP/port (this will create a TEMPORARY "
+ "server), port is 6667 by default\n"
+ " - URL with format: irc[6][s]://[nickname[:password]@]"
+ "irc.example.org[:port][/#channel1][,#channel2[...]]\n"
+ " option: set option for server (for boolean option, value can be "
+ "omitted)\n"
+ " nooption: set boolean option to 'off' (for example: -nossl)\n"
+ " -all: connect to all servers defined in configuration\n"
+ " -auto: connect to servers with autoconnect enabled\n"
+ " -open: connect to all opened servers that are not currently "
+ "connected\n"
+ " -nojoin: do not join any channel (even if autojoin is enabled on "
+ "server)\n"
+ " -switch: switch to next server address\n"
+ "\n"
+ "To disconnect from a server or stop any connection attempt, use "
+ "command /disconnect.\n"
+ "\n"
+ "Examples:\n"
+ " /connect freenode\n"
+ " /connect irc.oftc.net/6667\n"
+ " /connect irc6.oftc.net/6667 -ipv6\n"
+ " /connect irc6.oftc.net/6697 -ipv6 -ssl\n"
+ " /connect my.server.org/6697 -ssl -password=test\n"
+ " /connect irc://nick@irc.oftc.net/#channel\n"
+ " /connect -switch"),
+ "%(irc_servers)|-all|-auto|-open|-nojoin|-switch|%*",
+ &irc_command_connect, NULL);
+ weechat_hook_command (
+ "ctcp",
+ N_("send a CTCP message (Client-To-Client Protocol)"),
+ N_("<target> <type> [<arguments>]"),
+ N_(" target: nick or channel to send CTCP to\n"
+ " type: CTCP type (examples: \"version\", \"ping\", ..)\n"
+ "arguments: arguments for CTCP"),
+ "%(irc_channel)|%(nicks) action|clientinfo|finger|ping|source|time|"
+ "userinfo|version",
+ &irc_command_ctcp, NULL);
+ weechat_hook_command (
+ "cycle",
+ N_("leave and rejoin a channel"),
+ 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 a DCC (file transfer 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"
+ " send file \"/home/foo/bar.txt\" to nick \"toto\":\n"
+ " /dcc send toto /home/foo/bar.txt"),
+ "chat %(nicks)"
+ " || send %(nicks) %(filename)",
+ &irc_command_dcc, NULL);
+ weechat_hook_command (
+ "dehalfop",
+ N_("remove channel half-operator status from nick(s)"),
+ N_("<nick> [<nick>...]"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: remove channel half-operator status from everybody on channel "
+ "except yourself"),
+ "%(nicks)", &irc_command_dehalfop, NULL);
+ weechat_hook_command (
+ "deop",
+ N_("remove channel operator status from nick(s)"),
+ N_("<nick> [<nick>...] || * -yes"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: remove channel operator status from everybody on channel "
+ "except yourself"),
+ "%(nicks)|%*", &irc_command_deop, NULL);
+ weechat_hook_command (
+ "devoice",
+ N_("remove voice from nick(s)"),
+ N_("<nick> [<nick>...] || * -yes"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: remove voice from everybody on channel"),
+ "%(nicks)|%*", &irc_command_devoice, NULL);
+ weechat_hook_command (
+ "die",
+ N_("shutdown the server"),
+ N_("[<target>]"),
+ N_("target: server name"),
+ NULL, &irc_command_die, NULL);
+ weechat_hook_command (
+ "disconnect",
+ N_("disconnect from one or all IRC servers"),
+ N_("[<server>|-all|-pending [<reason>]]"),
+ N_(" server: server name to disconnect\n"
+ " -all: disconnect from all servers\n"
+ "-pending: cancel auto-reconnection on servers currently "
+ "reconnecting\n"
+ " reason: reason for quit"),
+ "%(irc_servers)|-all|-pending",
+ &irc_command_disconnect, NULL);
+ weechat_hook_command (
+ "halfop",
+ N_("give channel half-operator status to nick(s)"),
+ N_("<nick> [<nick>...] || * -yes"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: give channel half-operator status to everybody on channel"),
+ "%(nicks)", &irc_command_halfop, NULL);
+ weechat_hook_command (
+ "ignore",
+ N_("ignore nicks/hosts from servers or channels"),
+ 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 a POSIX extended regular "
+ "expression if \"re:\" is given or a mask using \"*\" to replace one "
+ "or more chars)\n"
+ " del: delete an ignore\n"
+ " number: number of ignore to delete (look at list to find it)\n"
+ " -all: delete all ignores\n"
+ " server: internal server name where ignore is working\n"
+ " channel: channel name where ignore is working\n"
+ "\n"
+ "Note: the regular expression can start with \"(?-i)\" to become "
+ "case sensitive.\n"
+ "\n"
+ "Examples:\n"
+ " ignore nick \"toto\" everywhere:\n"
+ " /ignore add toto\n"
+ " ignore host \"toto@domain.com\" on freenode server:\n"
+ " /ignore add toto@domain.com freenode\n"
+ " ignore host \"toto*@*.domain.com\" on freenode/#weechat:\n"
+ " /ignore add toto*@*.domain.com freenode #weechat"),
+ "list"
+ " || add %(irc_channel_nicks_hosts) %(irc_servers) %(irc_channels) %-"
+ " || del -all|%(irc_ignores_numbers) %-",
+ &irc_command_ignore, NULL);
+ weechat_hook_command (
+ "info",
+ N_("get information describing the server"),
+ N_("[<target>]"),
+ N_("target: server name"),
+ NULL, &irc_command_info, NULL);
+ weechat_hook_command (
+ "invite",
+ N_("invite a nick on a channel"),
+ N_("<nick> [<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 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_("[-noswitch] [-server <server>] "
+ "[<channel1>[,<channel2>...]] [<key1>[,<key2>...]]"),
+ N_("-noswitch: do not switch to new buffer\n"
+ " server: send to this server (internal name)\n"
+ " channel: channel name to join\n"
+ " key: key to join the channel (channels with a key must be the "
+ "first in list)\n"
+ "\n"
+ "Examples:\n"
+ " /join #weechat\n"
+ " /join #protectedchan,#weechat key\n"
+ " /join -server freenode #weechat\n"
+ " /join -noswitch #weechat"),
+ "%(irc_channels)|-noswitch|-server|%(irc_servers)|%*",
+ &irc_command_join, NULL);
+ weechat_hook_command (
+ "kick",
+ N_("forcibly remove a user from a channel"),
+ N_("[<channel>] <nick> [<reason>]"),
+ N_("channel: channel where user is\n"
+ " nick: nick to kick\n"
+ " reason: reason for kick (special variables $nick, $channel and "
+ "$server are replaced by their value)"),
+ "%(nicks) %(irc_msg_kick) %-", &irc_command_kick, NULL);
+ weechat_hook_command (
+ "kickban",
+ N_("kicks and bans a nick from a channel"),
+ N_("[<channel>] <nick> [<reason>]"),
+ N_("channel: channel where user is\n"
+ " nick: nick to kick and ban\n"
+ " reason: reason for kick (special variables $nick, $channel and "
+ "$channel are replaced by their value)\n"
+ "\n"
+ "It is possible to kick/ban with a mask, nick will be extracted from "
+ "mask and replaced by \"*\".\n"
+ "\n"
+ "Example:\n"
+ " ban \"*!*@host.com\" and then kick \"toto\":\n"
+ " /kickban toto!*@host.com"),
+ "%(irc_channel_nicks_hosts) %(irc_msg_kick) %-",
+ &irc_command_kickban, NULL);
+ weechat_hook_command (
+ "kill",
+ N_("close client-server connection"),
+ 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: this server should answer the query\n"
+ "server_mask: list of servers must match this mask"),
+ NULL, &irc_command_links, NULL);
+ weechat_hook_command (
+ "list",
+ N_("list channels and their topic"),
+ N_("[<channel>[,<channel>...]] [<server>] "
+ "[-re <regex>]"),
+ N_("channel: channel to list\n"
+ " server: server name\n"
+ " regex: POSIX extended regular expression used to filter results "
+ "(case insensitive, can start by \"(?-i)\" to become case "
+ "sensitive)\n"
+ "\n"
+ "Examples:\n"
+ " list all channels on server (can be very slow on large networks):\n"
+ " /list\n"
+ " list channel #weechat:\n"
+ " /list #weechat\n"
+ " list all channels beginning with \"#weechat\" (can be very slow "
+ "on large networks):\n"
+ " /list -re #weechat.*"),
+ NULL, &irc_command_list, NULL);
+ weechat_hook_command (
+ "lusers",
+ N_("get statistics about the size of the IRC network"),
+ N_("[<mask> [<target>]]"),
+ N_(" mask: servers matching the mask only\n"
+ "target: server for forwarding request"),
+ NULL, &irc_command_lusers, NULL);
+ weechat_hook_command (
+ "map",
+ N_("show a graphical map of the IRC network"),
+ "",
+ "",
+ NULL, &irc_command_map, NULL);
+ weechat_hook_command (
+ "me",
+ N_("send a CTCP action to the current channel"),
+ 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|m|l|b|e|v|k [<arguments>]"
+ " || <nick> [+|-]i|s|w|o"),
+ N_("channel modes:\n"
+ " channel: channel name to modify (default is current one)\n"
+ " o: give/take channel operator privileges\n"
+ " p: private channel flag\n"
+ " s: secret channel flag\n"
+ " i: invite-only channel flag\n"
+ " t: topic settable by channel operator only flag\n"
+ " n: no messages to channel from clients on the outside\n"
+ " m: moderated channel\n"
+ " l: set the user limit to channel\n"
+ " b: set a ban mask to keep users out\n"
+ " e: set exception mask\n"
+ " v: give/take the ability to speak on a moderated channel\n"
+ " k: set a channel key (password)\n"
+ "user modes:\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\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 #weechat +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: 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: send to this server (internal name)\n"
+ "target: nick or channel (may be mask, '*' = current channel)\n"
+ " text: text to send"),
+ "-server %(irc_servers)"
+ " || %(nicks)",
+ &irc_command_msg, NULL);
+ weechat_hook_command (
+ "names",
+ 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 nick"),
+ N_("[-all] <nick>"),
+ N_("-all: set new nick for all connected servers\n"
+ "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: send to this server (internal name)\n"
+ "target: nick or channel\n"
+ " text: text to send"),
+ "%(nicks)|-server %(irc_servers)", &irc_command_notice, NULL);
+ 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: add a notification\n"
+ " nick: nick\n"
+ "server: internal server name (by default current server)\n"
+ " -away: notify when away message is changed (by doing whois on "
+ "nick)\n"
+ " del: delete a notification\n"
+ " -all: delete all notifications\n"
+ "\n"
+ "Without argument, this command displays notifications for current "
+ "server (or all servers if command is issued on core buffer).\n"
+ "\n"
+ "Examples:\n"
+ " notify when \"toto\" joins/quits current server:\n"
+ " /notify add toto\n"
+ " notify when \"toto\" joins/quits freenode server:\n"
+ " /notify add toto freenode\n"
+ " notify when \"toto\" is away or back on freenode server:\n"
+ " /notify add toto freenode -away"),
+ "add %(irc_channel_nicks) %(irc_servers) -away %-"
+ " || del -all|%(irc_notify_nicks) %(irc_servers) %-",
+ &irc_command_notify, NULL);
+ weechat_hook_command (
+ "op",
+ N_("give channel operator status to nick(s)"),
+ N_("<nick> [<nick>...] || * -yes"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: give channel operator status to everybody on channel"),
+ "%(nicks)|%*", &irc_command_op, NULL);
+ weechat_hook_command (
+ "oper",
+ N_("get operator privileges"),
+ 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>...]] [<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_("send a ping to server"),
+ N_("<server1> [<server2>]"),
+ N_("server1: server\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: 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>] <nick>[,<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 (
+ "quiet",
+ N_("quiet nicks or hosts"),
+ N_("[<channel>] [<nick> [<nick>...]]"),
+ N_("channel: channel for quiet\n"
+ " nick: user or host to quiet\n"
+ "\n"
+ "Without argument, this command display quiet list for current "
+ "channel."),
+ "%(irc_channel_nicks_hosts)", &irc_command_quiet, NULL);
+ weechat_hook_command (
+ "quote",
+ N_("send raw data to server without parsing"),
+ 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_("<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"),
+ "%(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: extra option, for some servers"),
+ NULL, &irc_command_rehash, NULL);
+ weechat_hook_command (
+ "restart",
+ N_("tell the server to restart itself"),
+ N_("[<target>]"),
+ N_("target: server name"),
+ NULL, &irc_command_restart, NULL);
+ weechat_hook_command (
+ "sajoin",
+ N_("force a user to join channel(s)"),
+ 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"),
+ N_("<channel> <mode>"),
+ N_("channel: channel name\n"
+ " mode: mode for channel"),
+ "%(irc_server_channels)", &irc_command_samode, NULL);
+ weechat_hook_command (
+ "sanick",
+ N_("force a user to use another nick"),
+ N_("<nick> <new_nick>"),
+ N_(" nick: nick\n"
+ "new_nick: new nick"),
+ "%(nicks) %(nicks)", &irc_command_sanick, NULL);
+ weechat_hook_command (
+ "sapart",
+ N_("force a user to leave channel(s)"),
+ N_("<nick> <channel>[,<channel>...]"),
+ N_(" nick: nick\n"
+ "channel: channel name"),
+ "%(nicks) %(irc_server_channels)", &irc_command_sapart, NULL);
+ weechat_hook_command (
+ "saquit",
+ N_("force a user to quit server with a 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_("<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|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 each server\n"
+ " add: create a new server\n"
+ " server: server name, for internal and display use\n"
+ "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 option, value can be "
+ "omitted)\n"
+ "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 temporary servers only)\n"
+ " 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"
+ "Examples:\n"
+ " /server listfull\n"
+ " /server add oftc irc.oftc.net/6697 -ssl -autoconnect\n"
+ " /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n"
+ " /server add freenode2 chat.eu.freenode.net/6667,"
+ "chat.us.freenode.net/6667\n"
+ " /server add freenode3 irc.freenode.net -password=mypass\n"
+ " /server copy oftc oftcbis\n"
+ " /server rename oftc newoftc\n"
+ " /server del freenode\n"
+ " /server deloutq"),
+ "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"
+ " || raw",
+ &irc_command_server, NULL);
+ weechat_hook_command (
+ "servlist",
+ N_("list services currently connected to the network"),
+ 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: name of service\n"
+ " 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"
+ "comment: comment for quit"),
+ NULL, &irc_command_squit, NULL);
+ weechat_hook_command (
+ "stats",
+ N_("query statistics about 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);
+ weechat_hook_command (
+ "summon",
+ 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: username\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: query time from specified server"),
+ NULL, &irc_command_time, NULL);
+ weechat_hook_command (
+ "topic",
+ N_("get/set channel topic"),
+ N_("[<channel>] [<topic>|-delete]"),
+ N_("channel: channel name\n"
+ " 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: server"),
+ NULL, &irc_command_trace, NULL);
+ weechat_hook_command (
+ "unban",
+ N_("unban nicks or hosts"),
+ 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 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: server"),
+ NULL, &irc_command_users, NULL);
+ weechat_hook_command (
+ "version",
+ N_("give the version info of nick or server (current or specified)"),
+ N_("[<server>|<nick>]"),
+ N_("server: server name\n"
+ " nick: nick"),
+ "%(nicks)", &irc_command_version, NULL);
+ weechat_hook_command (
+ "voice",
+ N_("give voice to nick(s)"),
+ N_("<nick> [<nick>...]"),
+ N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
+ " *: give voice to everybody on channel"),
+ "%(nicks)|%*", &irc_command_voice, NULL);
+ weechat_hook_command (
+ "wallchops",
+ N_("send a notice to channel ops"),
+ 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: 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: 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>] [<nick>[,<nick>...]]"),
+ N_("server: server name\n"
+ " nick: nick (may be a mask)\n"
+ "\n"
+ "Without argument, this command will do a whois on:\n"
+ "- your own nick if buffer is a server/channel\n"
+ "- remote nick if buffer is a private."),
+ "%(nicks)", &irc_command_whois, NULL);
+ weechat_hook_command (
+ "whowas",
+ N_("ask for information about a nick which no longer exists"),
+ 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"),
+ "%(nicks)", &irc_command_whowas, NULL);
}
diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c
index e9ede3f78..d157f896b 100644
--- a/src/plugins/logger/logger.c
+++ b/src/plugins/logger/logger.c
@@ -1314,46 +1314,46 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
logger_config_read ();
/* command /logger */
- weechat_hook_command ("logger",
- N_("logger plugin configuration"),
- N_("list"
- " || set <level>"
- " || flush"
- " || 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 = "
- "logging disabled, 1 = a few messages (most "
- "important) .. 9 = all messages)\n"
- " flush: write all log files now\n"
- "disable: disable logging on current buffer (set "
- "level to 0)\n\n"
- "Options \"logger.level.*\" and \"logger.mask.*\" "
- "can be used to set level or mask for a buffer, "
- "or buffers beginning with name.\n\n"
- "Log levels used by IRC plugin:\n"
- " 1: user message, notice, private\n"
- " 2: nick change\n"
- " 3: server message\n"
- " 4: join/part/quit\n"
- " 9: all other messages\n\n"
- "Examples:\n"
- " set level to 5 for current buffer:\n"
- " /logger set 5\n"
- " disable logging for current buffer:\n"
- " /logger disable\n"
- " set level to 3 for all IRC buffers:\n"
- " /set logger.level.irc 3\n"
- " disable logging for main WeeChat buffer:\n"
- " /set logger.level.core.weechat 0\n"
- " use a directory per IRC server and a file per "
- "channel inside:\n"
- " /set logger.mask.irc \"$server/$channel.weechatlog\""),
- "list"
- " || set 1|2|3|4|5|6|7|8|9"
- " || flush"
- " || disable",
- &logger_command_cb, NULL);
+ weechat_hook_command (
+ "logger",
+ N_("logger plugin configuration"),
+ N_("list"
+ " || set <level>"
+ " || flush"
+ " || 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 = logging disabled, "
+ "1 = a few messages (most important) .. 9 = all messages)\n"
+ " flush: write all log files now\n"
+ "disable: disable logging on current buffer (set level to 0)\n"
+ "\n"
+ "Options \"logger.level.*\" and \"logger.mask.*\" can be used to set "
+ "level or mask for a buffer, or buffers beginning with name.\n"
+ "\n"
+ "Log levels used by IRC plugin:\n"
+ " 1: user message, notice, private\n"
+ " 2: nick change\n"
+ " 3: server message\n"
+ " 4: join/part/quit\n"
+ " 9: all other messages\n"
+ "\n"
+ "Examples:\n"
+ " set level to 5 for current buffer:\n"
+ " /logger set 5\n"
+ " disable logging for current buffer:\n"
+ " /logger disable\n"
+ " set level to 3 for all IRC buffers:\n"
+ " /set logger.level.irc 3\n"
+ " disable logging for main WeeChat buffer:\n"
+ " /set logger.level.core.weechat 0\n"
+ " use a directory per IRC server and a file per channel inside:\n"
+ " /set logger.mask.irc \"$server/$channel.weechatlog\""),
+ "list"
+ " || set 1|2|3|4|5|6|7|8|9"
+ " || flush"
+ " || disable",
+ &logger_command_cb, NULL);
logger_start_buffer_all (1);
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c
index 60a547ffd..a4fd21a4a 100644
--- a/src/plugins/plugin-script.c
+++ b/src/plugins/plugin-script.c
@@ -154,30 +154,28 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
"%s",
string);
}
- weechat_hook_command (weechat_plugin->name,
- N_("list/load/unload scripts"),
- N_("list|listfull [<name>]"
- " || load [-q] <filename>"
- " || autoload"
- " || reload|unload [-q] [<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"
- " -q: quiet mode: do not display messages\n\n"
- "Without argument, this command "
- "lists all loaded scripts."),
- completion,
- init->callback_command, NULL);
+ weechat_hook_command (
+ weechat_plugin->name,
+ N_("list/load/unload scripts"),
+ N_("list|listfull [<name>]"
+ " || load [-q] <filename>"
+ " || autoload"
+ " || reload|unload [-q] [<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"
+ " -q: quiet mode: do not display messages\n"
+ "\n"
+ "Without argument, this command lists all loaded scripts."),
+ completion,
+ init->callback_command, NULL);
if (string)
free (string);
if (completion)
diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c
index 1a7b3c28f..9e35eb42e 100644
--- a/src/plugins/relay/relay-command.c
+++ b/src/plugins/relay/relay-command.c
@@ -307,60 +307,58 @@ relay_command_relay (void *data, struct t_gui_buffer *buffer, int argc,
void
relay_command_init ()
{
- weechat_hook_command ("relay",
- N_("relay control"),
- N_("list|listfull|listrelay"
- " || add [ipv4.][ipv6.][ssl.]<protocol.name> <port>"
- " || del [ipv4.][ipv6.][ssl.]<protocol.name>"
- " || raw"
- " || sslcertkey"),
- N_(" list: list relay clients (only active "
- "relays)\n"
- " listfull: list relay clients (verbose, all "
- "relays)\n"
- " listrelay: list relays (name and port)\n"
- " add: add relay for a protocol + name\n"
- " del: remove relay for a protocol + name\n"
- " ipv4: force use of IPv4\n"
- " ipv6: force use of IPv6\n"
- " ssl: enable SSL\n"
- "protocol.name: protocol and name to relay:\n"
- " - protocol \"irc\": name is the "
- "server to share (optional, if not given, the server "
- "name must be sent by client in command \"PASS\", "
- "with format: \"PASS server:password\")\n"
- " - protocol \"weechat\" (name is "
- "not used)\n"
- " port: port used for relay\n"
- " raw: open buffer with raw Relay data\n"
- " sslcertkey: set SSL certificate/key using path "
- "in option relay.network.ssl_cert_key\n\n"
- "Without argument, this command opens buffer "
- "with list of relay clients.\n\n"
- "Examples:\n"
- " irc proxy, for server \"freenode\":\n"
- " /relay add irc.freenode 8000\n"
- " irc proxy, for server \"freenode\", with SSL:\n"
- " /relay add ssl.irc.freenode 8001\n"
- " irc proxy, for all servers (client will choose), "
- "with SSL:\n"
- " /relay add ssl.irc 8002\n"
- " weechat protocol:\n"
- " /relay add weechat 9000\n"
- " weechat protocol with SSL:\n"
- " /relay add ssl.weechat 9001\n"
- " weechat protocol with SSL, using only IPv4:\n"
- " /relay add ipv4.ssl.weechat 9001\n"
- " weechat protocol with SSL, using only IPv6:\n"
- " /relay add ipv6.ssl.weechat 9001\n"
- " weechat protocol with SSL, using IPv4 + IPv6:\n"
- " /relay add ipv4.ipv6.ssl.weechat 9001"),
- "list %(relay_relays)"
- " || listfull %(relay_relays)"
- " || listrelay"
- " || add %(relay_protocol_name) %(relay_free_port)"
- " || del %(relay_relays)"
- " || raw"
- " || sslcertkey",
- &relay_command_relay, NULL);
+ weechat_hook_command (
+ "relay",
+ N_("relay control"),
+ N_("list|listfull|listrelay"
+ " || add [ipv4.][ipv6.][ssl.]<protocol.name> <port>"
+ " || del [ipv4.][ipv6.][ssl.]<protocol.name>"
+ " || raw"
+ " || sslcertkey"),
+ N_(" list: list relay clients (only active relays)\n"
+ " listfull: list relay clients (verbose, all relays)\n"
+ " listrelay: list relays (name and port)\n"
+ " add: add relay for a protocol + name\n"
+ " del: remove relay for a protocol + name\n"
+ " ipv4: force use of IPv4\n"
+ " ipv6: force use of IPv6\n"
+ " ssl: enable SSL\n"
+ "protocol.name: protocol and name to relay:\n"
+ " - protocol \"irc\": name is the server to share "
+ "(optional, if not given, the server name must be sent by client in "
+ "command \"PASS\", with format: \"PASS server:password\")\n"
+ " - protocol \"weechat\" (name is not used)\n"
+ " port: port used for relay\n"
+ " raw: open buffer with raw Relay data\n"
+ " sslcertkey: set SSL certificate/key using path in option "
+ "relay.network.ssl_cert_key\n"
+ "\n"
+ "Without argument, this command opens buffer with list of relay "
+ "clients.\n"
+ "\n"
+ "Examples:\n"
+ " irc proxy, for server \"freenode\":\n"
+ " /relay add irc.freenode 8000\n"
+ " irc proxy, for server \"freenode\", with SSL:\n"
+ " /relay add ssl.irc.freenode 8001\n"
+ " irc proxy, for all servers (client will choose), with SSL:\n"
+ " /relay add ssl.irc 8002\n"
+ " weechat protocol:\n"
+ " /relay add weechat 9000\n"
+ " weechat protocol with SSL:\n"
+ " /relay add ssl.weechat 9001\n"
+ " weechat protocol with SSL, using only IPv4:\n"
+ " /relay add ipv4.ssl.weechat 9001\n"
+ " weechat protocol with SSL, using only IPv6:\n"
+ " /relay add ipv6.ssl.weechat 9001\n"
+ " weechat protocol with SSL, using IPv4 + IPv6:\n"
+ " /relay add ipv4.ipv6.ssl.weechat 9001"),
+ "list %(relay_relays)"
+ " || listfull %(relay_relays)"
+ " || listrelay"
+ " || add %(relay_protocol_name) %(relay_free_port)"
+ " || del %(relay_relays)"
+ " || raw"
+ " || sslcertkey",
+ &relay_command_relay, NULL);
}
diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c
index bb3eeccf4..753a84f44 100644
--- a/src/plugins/rmodifier/rmodifier-command.c
+++ b/src/plugins/rmodifier/rmodifier-command.c
@@ -240,41 +240,41 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
void
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>...]"
- " || missing"
- " || default -yes"),
- N_(" list: list all rmodifiers\n"
- "listdefault: list default rmodifiers\n"
- " add: add a rmodifier\n"
- " name: name of rmodifier\n"
- " modifiers: comma separated list of modifiers\n"
- " groups: action on groups captured in regular "
- "expression (inside parentheses): comma separated "
- "list of groups (from 1 to 9) with optional \"*\" "
- "after number to hide the group\n"
- " regex: POSIX extended regular expression "
- "(case insensitive, can start by \"(?-i)\" to "
- "become case sensitive)\n"
- " del: delete a rmodifier\n"
- " -all: delete all rmodifiers\n"
- " missing: add missing rmodifiers\n"
- " default: restore default rmodifiers\n\n"
- "Examples:\n"
- " hide everything typed after a command /password:\n"
- " /rmodifier add password input_text_display 1,2* ^(/password +)(.*)\n"
- " delete rmodifier \"password\":\n"
- " /rmodifier del password\n"
- " delete all rmodifiers:\n"
- " /rmodifier del -all"),
- "list"
- " || listdefault"
- " || add %(rmodifier)"
- " || del %(rmodifier)|-all %(rmodifier)|%*"
- " || missing"
- " || default",
- &rmodifier_command_cb, NULL);
+ weechat_hook_command (
+ "rmodifier",
+ N_("alter modifier strings with regular expressions"),
+ N_("list|listdefault"
+ " || add <name> <modifiers> <groups> <regex>"
+ " || del <name>|-all [<name>...]"
+ " || missing"
+ " || default -yes"),
+ N_(" list: list all rmodifiers\n"
+ "listdefault: list default rmodifiers\n"
+ " add: add a rmodifier\n"
+ " name: name of rmodifier\n"
+ " modifiers: comma separated list of modifiers\n"
+ " groups: action on groups captured in regular expression "
+ "(inside parentheses): comma separated list of groups (from 1 to 9) "
+ "with optional \"*\" after number to hide the group\n"
+ " regex: POSIX extended regular expression (case insensitive, "
+ "can start by \"(?-i)\" to become case sensitive)\n"
+ " del: delete a rmodifier\n"
+ " -all: delete all rmodifiers\n"
+ " missing: add missing rmodifiers\n"
+ " default: restore default rmodifiers\n"
+ "\n"
+ "Examples:\n"
+ " hide everything typed after a command /password:\n"
+ " /rmodifier add password input_text_display 1,2* ^(/password +)(.*)\n"
+ " delete rmodifier \"password\":\n"
+ " /rmodifier del password\n"
+ " delete all rmodifiers:\n"
+ " /rmodifier del -all"),
+ "list"
+ " || listdefault"
+ " || add %(rmodifier)"
+ " || del %(rmodifier)|-all %(rmodifier)|%*"
+ " || missing"
+ " || default",
+ &rmodifier_command_cb, NULL);
}
diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c
index add172b0c..ce092af2e 100644
--- a/src/plugins/script/script-command.c
+++ b/src/plugins/script/script-command.c
@@ -263,97 +263,102 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc,
void
script_command_init ()
{
- weechat_hook_command ("script",
- N_("WeeChat scripts manager"),
- N_("list [-o|-i] || search <text> || show <script>"
- " || load|unload|reload <script> [<script>...]"
- " || autoload|noautoload|toggleautoload <script> [<script>...]"
- " || install|remove|installremove|hold [-q] <script> [<script>...]"
- " || upgrade || update"),
- N_(" list: list loaded scripts (all languages)\n"
- " -o: send list of loaded scripts to buffer\n"
- " -i: copy list of loaded scripts in "
- "command line (for sending to buffer)\n"
- " search: search scripts by tags or text and "
- "display result on scripts buffer\n"
- " show: show detailed info about a script\n"
- " load: load script(s)\n"
- " unload: unload script(s)\n"
- " reload: reload script(s)\n"
- " autoload: autoload the script\n"
- " noautoload: do not autoload the script\n"
- "toggleautoload: toggle autoload\n"
- " install: install/upgrade script(s)\n"
- " remove: remove script(s)\n"
- " installremove: install or remove script(s), "
- "depending on current state\n"
- " hold: hold/unhold script(s) (a script held "
- "will not be upgraded any more and cannot be "
- "removed)\n"
- " -q: quiet mode: do not display messages\n"
- " upgrade: upgrade all installed scripts which "
- "are obsolete (new version available)\n"
- " update: update local scripts cache\n\n"
- "Without argument, this command opens a buffer "
- "with list of scripts.\n\n"
- "On script buffer, the possible status for each "
- "script are:\n"
- " * i a H r N\n"
- " | | | | | |\n"
- " | | | | | obsolete (new version available)\n"
- " | | | | running (loaded)\n"
- " | | | held\n"
- " | | autoloaded\n"
- " | installed\n"
- " popular script\n\n"
- "Keys on script buffer:\n"
- " alt+i install script\n"
- " alt+r remove script\n"
- " alt+l load script\n"
- " alt+L reload script\n"
- " alt+u unload script\n"
- " alt+A autoload script\n"
- " alt+h (un)hold script\n"
- " alt+v view script\n\n"
- "Input allowed on script buffer:\n"
- " i/r/l/L/u/h action on script (same as keys above)\n"
- " q close buffer\n"
- " $ refresh buffer\n"
- " s:x,y sort buffer using keys x and y (see /help "
- "script.look.sort)\n"
- " s: reset sort (use default sort)\n"
- " word(s) filter scripts: search word(s) in "
- "scripts (description, tags, ...)\n"
- " * remove filter\n\n"
- "Mouse actions on script buffer:\n"
- " wheel scroll list\n"
- " left button select script\n"
- " right button install/remove script\n\n"
- "Examples:\n"
- " /script search url\n"
- " /script install iset.pl buffers.pl\n"
- " /script remove iset.pl\n"
- " /script hold urlserver.py\n"
- " /script reload urlserver\n"
- " /script upgrade"),
- "list -o|-i"
- " || search %(script_tags)"
- " || show %(script_scripts)"
- " || load %(script_files)|%*"
- " || unload %(python_script)|%(perl_script)|"
- "%(ruby_script)|%(tcl_script)|%(lua_script)|"
- "%(guile_script)|%*"
- " || reload %(python_script)|%(perl_script)|"
- "%(ruby_script)|%(tcl_script)|%(lua_script)|"
- "%(guile_script)|%*"
- " || autoload %(script_scripts_installed)|%*"
- " || noautoload %(script_scripts_installed)|%*"
- " || toggleautoload %(script_scripts_installed)|%*"
- " || install %(script_scripts)|%*"
- " || remove %(script_scripts_installed)|%*"
- " || installremove %(script_scripts)|%*"
- " || hold %(script_scripts)|%*"
- " || update"
- " || upgrade",
- &script_command_script, NULL);
+ weechat_hook_command (
+ "script",
+ N_("WeeChat scripts manager"),
+ N_("list [-o|-i]"
+ " || search <text>"
+ " || show <script>"
+ " || load|unload|reload <script> [<script>...]"
+ " || autoload|noautoload|toggleautoload <script> [<script>...]"
+ " || install|remove|installremove|hold [-q] <script> [<script>...]"
+ " || upgrade"
+ " || update"),
+ N_(" list: list loaded scripts (all languages)\n"
+ " -o: send list of loaded scripts to buffer\n"
+ " -i: copy list of loaded scripts in command line (for "
+ "sending to buffer)\n"
+ " search: search scripts by tags or text and display result "
+ "on scripts buffer\n"
+ " show: show detailed info about a script\n"
+ " load: load script(s)\n"
+ " unload: unload script(s)\n"
+ " reload: reload script(s)\n"
+ " autoload: autoload the script\n"
+ " noautoload: do not autoload the script\n"
+ "toggleautoload: toggle autoload\n"
+ " install: install/upgrade script(s)\n"
+ " remove: remove script(s)\n"
+ " installremove: install or remove script(s), depending on current "
+ "state\n"
+ " hold: hold/unhold script(s) (a script held will not be "
+ "upgraded any more and cannot be removed)\n"
+ " -q: quiet mode: do not display messages\n"
+ " upgrade: upgrade all installed scripts which are obsolete "
+ "(new version available)\n"
+ " update: update local scripts cache\n"
+ "\n"
+ "Without argument, this command opens a buffer with list of scripts.\n"
+ "\n"
+ "On script buffer, the possible status for each script are:\n"
+ " * i a H r N\n"
+ " | | | | | |\n"
+ " | | | | | obsolete (new version available)\n"
+ " | | | | running (loaded)\n"
+ " | | | held\n"
+ " | | autoloaded\n"
+ " | installed\n"
+ " popular script\n"
+ "\n"
+ "Keys on script buffer:\n"
+ " alt+i install script\n"
+ " alt+r remove script\n"
+ " alt+l load script\n"
+ " alt+L reload script\n"
+ " alt+u unload script\n"
+ " alt+A autoload script\n"
+ " alt+h (un)hold script\n"
+ " alt+v view script\n"
+ "\n"
+ "Input allowed on script buffer:\n"
+ " i/r/l/L/u/h action on script (same as keys above)\n"
+ " q close buffer\n"
+ " $ refresh buffer\n"
+ " s:x,y sort buffer using keys x and y (see /help "
+ "script.look.sort)\n"
+ " s: reset sort (use default sort)\n"
+ " word(s) filter scripts: search word(s) in scripts "
+ "(description, tags, ...)\n"
+ " * remove filter\n"
+ "\n"
+ "Mouse actions on script buffer:\n"
+ " wheel scroll list\n"
+ " left button select script\n"
+ " right button install/remove script\n"
+ "\n"
+ "Examples:\n"
+ " /script search url\n"
+ " /script install iset.pl buffers.pl\n"
+ " /script remove iset.pl\n"
+ " /script hold urlserver.py\n"
+ " /script reload urlserver\n"
+ " /script upgrade"),
+ "list -o|-i"
+ " || search %(script_tags)"
+ " || show %(script_scripts)"
+ " || load %(script_files)|%*"
+ " || unload %(python_script)|%(perl_script)|%(ruby_script)|"
+ "%(tcl_script)|%(lua_script)|%(guile_script)|%*"
+ " || reload %(python_script)|%(perl_script)|%(ruby_script)|"
+ "%(tcl_script)|%(lua_script)|%(guile_script)|%*"
+ " || autoload %(script_scripts_installed)|%*"
+ " || noautoload %(script_scripts_installed)|%*"
+ " || toggleautoload %(script_scripts_installed)|%*"
+ " || install %(script_scripts)|%*"
+ " || remove %(script_scripts_installed)|%*"
+ " || installremove %(script_scripts)|%*"
+ " || hold %(script_scripts)|%*"
+ " || update"
+ " || upgrade",
+ &script_command_script, NULL);
}
diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c
index dd6cb6693..58ea812e5 100644
--- a/src/plugins/xfer/xfer-command.c
+++ b/src/plugins/xfer/xfer-command.c
@@ -246,17 +246,19 @@ xfer_command_xfer (void *data, struct t_gui_buffer *buffer, int argc,
void
xfer_command_init ()
{
- weechat_hook_command ("me",
- N_("send a CTCP action to remote host"),
- N_("<message>"),
- N_("message: message to send"),
- NULL, &xfer_command_me, NULL);
- weechat_hook_command ("xfer",
- N_("xfer control"),
- "[list|listfull]",
- N_(" list: list xfer\n"
- "listfull: list xfer (verbose)\n\n"
- "Without argument, this command opens buffer "
- "with xfer list."),
- "list|listfull", &xfer_command_xfer, NULL);
+ weechat_hook_command (
+ "me",
+ N_("send a CTCP action to remote host"),
+ N_("<message>"),
+ N_("message: message to send"),
+ NULL, &xfer_command_me, NULL);
+ weechat_hook_command (
+ "xfer",
+ N_("xfer control"),
+ "[list|listfull]",
+ N_(" list: list xfer\n"
+ "listfull: list xfer (verbose)\n"
+ "\n"
+ "Without argument, this command opens buffer with xfer list."),
+ "list|listfull", &xfer_command_xfer, NULL);
}