mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
core: reformat hook_command arguments
This commit is contained in:
+46
-47
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
+727
-707
File diff suppressed because it is too large
Load Diff
+40
-40
@@ -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);
|
||||
|
||||
|
||||
+22
-24
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user