summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-04-12 23:07:06 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-04-12 23:07:06 +0200
commit34723d2accede91aa8e5ad98f3434104995e15bb (patch)
tree89e470cffbeb4f5673e8ba2d008f1e963030c62a /doc/en
parent001ea53f9de524bee480cdd3996b1c9e10b2d568 (diff)
downloadweechat-34723d2accede91aa8e5ad98f3434104995e15bb.zip
api: allow wildcard "*" inside the mask in function string_match
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/autogen/plugin_api/infolists.txt36
-rw-r--r--doc/en/autogen/user/alias_commands.txt2
-rw-r--r--doc/en/autogen/user/irc_commands.txt18
-rw-r--r--doc/en/autogen/user/irc_options.txt2
-rw-r--r--doc/en/autogen/user/trigger_commands.txt2
-rw-r--r--doc/en/autogen/user/weechat_commands.txt10
-rw-r--r--doc/en/autogen/user/weechat_options.txt4
-rw-r--r--doc/en/weechat_plugin_api.en.txt40
8 files changed, 61 insertions, 53 deletions
diff --git a/doc/en/autogen/plugin_api/infolists.txt b/doc/en/autogen/plugin_api/infolists.txt
index 9c6eb98bc..b624a9018 100644
--- a/doc/en/autogen/plugin_api/infolists.txt
+++ b/doc/en/autogen/plugin_api/infolists.txt
@@ -2,9 +2,9 @@
|===
| Plugin | Name | Description | Pointer | Arguments
-| alias | alias | list of aliases | alias pointer (optional) | alias name (can start or end with "*" as wildcard) (optional)
+| alias | alias | list of aliases | alias pointer (optional) | alias name (wildcard "*" is allowed) (optional)
-| guile | guile_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| guile | guile_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
| irc | irc_channel | list of channels for an IRC server | channel pointer (optional) | server,channel (channel is optional)
@@ -12,41 +12,41 @@
| irc | irc_nick | list of nicks for an IRC channel | nick pointer (optional) | server,channel,nick (channel and nick are optional)
-| irc | irc_notify | list of notify | notify pointer (optional) | server name (can start or end with "*" as wildcard) (optional)
+| irc | irc_notify | list of notify | notify pointer (optional) | server name (wildcard "*" is allowed) (optional)
-| irc | irc_server | list of IRC servers | server pointer (optional) | server name (can start or end with "*" as wildcard) (optional)
+| irc | irc_server | list of IRC servers | server pointer (optional) | server name (wildcard "*" is allowed) (optional)
| logger | logger_buffer | list of logger buffers | logger pointer (optional) | -
-| lua | lua_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| lua | lua_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
-| perl | perl_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| perl | perl_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
-| python | python_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| python | python_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
| relay | relay | list of relay clients | relay pointer (optional) | -
-| ruby | ruby_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| ruby | ruby_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
-| script | script_script | list of scripts | script pointer (optional) | script name with extension (can start or end with "*" as wildcard) (optional)
+| script | script_script | list of scripts | script pointer (optional) | script name with extension (wildcard "*" is allowed) (optional)
-| tcl | tcl_script | list of scripts | script pointer (optional) | script name (can start or end with "*" as wildcard) (optional)
+| tcl | tcl_script | list of scripts | script pointer (optional) | script name (wildcard "*" is allowed) (optional)
-| weechat | bar | list of bars | bar pointer (optional) | bar name (can start or end with "*" as wildcard) (optional)
+| weechat | bar | list of bars | bar pointer (optional) | bar name (wildcard "*" is allowed) (optional)
-| weechat | bar_item | list of bar items | bar item pointer (optional) | bar item name (can start or end with "*" as wildcard) (optional)
+| weechat | bar_item | list of bar items | bar item pointer (optional) | bar item name (wildcard "*" is allowed) (optional)
| weechat | bar_window | list of bar windows | bar window pointer (optional) | -
-| weechat | buffer | list of buffers | buffer pointer (optional) | buffer name (can start or end with "*" as wildcard) (optional)
+| weechat | buffer | list of buffers | buffer pointer (optional) | buffer name (wildcard "*" is allowed) (optional)
| weechat | buffer_lines | lines of a buffer | buffer pointer | -
-| weechat | filter | list of filters | - | filter name (can start or end with "*" as wildcard) (optional)
+| weechat | filter | list of filters | - | filter name (wildcard "*" is allowed) (optional)
| weechat | history | history of commands | buffer pointer (if not set, return global history) (optional) | -
-| weechat | hook | list of hooks | hook pointer (optional) | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional)
+| weechat | hook | list of hooks | hook pointer (optional) | type,arguments (type is command/timer/.., arguments to get only some hooks (wildcard "*" is allowed), both are optional)
| weechat | hotlist | list of buffers in hotlist | - | -
@@ -56,11 +56,11 @@
| weechat | nicklist | nicks in nicklist for a buffer | buffer pointer | nick_xxx or group_xxx to get only nick/group xxx (optional)
-| weechat | option | list of options | - | option name (can start or end with "*" as wildcard) (optional)
+| weechat | option | list of options | - | option name (wildcard "*" is allowed) (optional)
-| weechat | plugin | list of plugins | plugin pointer (optional) | plugin name (can start or end with "*" as wildcard) (optional)
+| weechat | plugin | list of plugins | plugin pointer (optional) | plugin name (wildcard "*" is allowed) (optional)
-| weechat | proxy | list of proxies | proxy pointer (optional) | proxy name (can start or end with "*" as wildcard) (optional)
+| weechat | proxy | list of proxies | proxy pointer (optional) | proxy name (wildcard "*" is allowed) (optional)
| weechat | url_options | options for URL | - | -
diff --git a/doc/en/autogen/user/alias_commands.txt b/doc/en/autogen/user/alias_commands.txt
index 669879e7b..1d56aec1a 100644
--- a/doc/en/autogen/user/alias_commands.txt
+++ b/doc/en/autogen/user/alias_commands.txt
@@ -6,7 +6,7 @@
completion: completion for alias (optional, by default completion is done with target command)
note: you can use %%command to use completion of an existing command
- alias: name of alias (can start or end with "*" for alias listing)
+ alias: name of alias (wildcard "*" is allowed)
command: command name with arguments (many commands can be separated by semicolons)
Without argument, this command lists all defined alias.
diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt
index 34e111bbe..08b0c2286 100644
--- a/doc/en/autogen/user/irc_commands.txt
+++ b/doc/en/autogen/user/irc_commands.txt
@@ -14,7 +14,7 @@ target: server name
/allchan [-current] [-exclude=<channel>[,<channel>...]] <command> [<arguments>]
-current: execute command for channels of current server only
- -exclude: exclude some channels ('*' is allowed at beginning or end of channel name, to exclude many channels)
+ -exclude: exclude some channels (wildcard "*" is allowed)
command: command to execute
arguments: arguments for command (special variables $nick, $channel and $server are replaced by their value)
@@ -34,7 +34,7 @@ Examples:
/allpv [-current] [-exclude=<nick>[,<nick>...]] <command> [<arguments>]
-current: execute command for private buffers of current server only
- -exclude: exclude some nicks ('*' is allowed at beginning or end of nick name, to exclude many nicks)
+ -exclude: exclude some nicks (wildcard "*" is allowed)
command: command to execute
arguments: arguments for command (special variables $nick, $channel and $server are replaced by their value)
@@ -55,7 +55,7 @@ Examples:
----
/allserv [-exclude=<server>[,<server>...]] <command> [<arguments>]
- -exclude: exclude some servers ('*' is allowed at beginning or end of server name, to exclude many servers)
+ -exclude: exclude some servers (wildcard "*" is allowed)
command: command to execute
arguments: arguments for command (special variables $nick, $channel and $server are replaced by their value)
@@ -155,7 +155,7 @@ Examples:
----
/dehalfop <nick> [<nick>...]
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: remove channel half-operator status from everybody on channel except yourself
----
@@ -166,7 +166,7 @@ nick: nick or mask (can start or end with "*" as wildcard)
/deop <nick> [<nick>...]
* -yes
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: remove channel operator status from everybody on channel except yourself
----
@@ -177,7 +177,7 @@ nick: nick or mask (can start or end with "*" as wildcard)
/devoice <nick> [<nick>...]
* -yes
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: remove voice from everybody on channel
----
@@ -209,7 +209,7 @@ target: server name
/halfop <nick> [<nick>...]
* -yes
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: give channel half-operator status to everybody on channel
----
@@ -498,7 +498,7 @@ Examples:
/op <nick> [<nick>...]
* -yes
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: give channel operator status to everybody on channel
----
@@ -838,7 +838,7 @@ server: server name
----
/voice <nick> [<nick>...]
-nick: nick or mask (can start or end with "*" as wildcard)
+nick: nick or mask (wildcard "*" is allowed)
*: give voice to everybody on channel
----
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index 03bd02074..c88335cac 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -174,7 +174,7 @@
** values: any string (default value: `"$nick"`)
* [[option_irc.look.highlight_tags_restrict]] *irc.look.highlight_tags_restrict*
-** description: `restrict highlights to these tags on irc buffers (to have highlight on user messages but not server messages); tags must be separated by a comma and "+" can be used to make a logical "and" between tags; tags can start or end with "*" to match more than one tag; an empty value allows highlight on any tag`
+** description: `restrict highlights to these tags on irc buffers (to have highlight on user messages but not server messages); tags must be separated by a comma and "+" can be used to make a logical "and" between tags; wildcard "*" is allowed in tags; an empty value allows highlight on any tag`
** type: string
** values: any string (default value: `"irc_privmsg,irc_notice"`)
diff --git a/doc/en/autogen/user/trigger_commands.txt b/doc/en/autogen/user/trigger_commands.txt
index 553056b7b..5f3c36ac2 100644
--- a/doc/en/autogen/user/trigger_commands.txt
+++ b/doc/en/autogen/user/trigger_commands.txt
@@ -56,7 +56,7 @@ return_code: return code in callback (ok (default), ok_eat, error)
-all: do action on all triggers
default: restore default triggers
monitor: open the trigger monitor buffer, with optional filter:
- filter: filter hooks/triggers to display (a hook must start with "@", for example "@signal"), many filters can be separated by commas; each trigger name can start or end with "*"
+ filter: filter hooks/triggers to display (a hook must start with "@", for example "@signal"), many filters can be separated by commas; wildcard "*" is allowed in each trigger name
When a trigger callback is called, following actions are performed, in this order:
1. check conditions; if false, exit
diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt
index c5b25e462..fb37f922a 100644
--- a/doc/en/autogen/user/weechat_commands.txt
+++ b/doc/en/autogen/user/weechat_commands.txt
@@ -314,10 +314,10 @@ disable: disable filters
- this is full name including plugin (example: "irc.freenode.#weechat")
- "*" means all buffers
- a name starting with '!' is excluded
- - name can start or end with '*' to match many buffers
+ - wildcard "*" is allowed
tags: comma separated list of tags, for example "irc_join,irc_part,irc_quit"
- logical "and": use "+" between tags (for example: "nick_toto+irc_action")
- - tags can start or end with '*'
+ - wildcard "*" is allowed
regex: POSIX extended regular expression to search in line
- use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
- if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
@@ -475,7 +475,7 @@ For context "mouse" (possible in context "cursor" too), key has format: "@area:k
bar(xxx): bar "xxx"
item(*): any bar item
item(xxx): bar item "xxx"
-The key can start or end with '*' to match many mouse events.
+Wildcard "*" is allowed in key to match many mouse events.
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.
Another special value "-" can be used to disable key (it will be ignored when looking for keys).
@@ -758,7 +758,7 @@ Examples:
/set [<option> [<value>]]
diff [<option> [<option>...]]
-option: name of an option (can start or end with '*' to list many options)
+option: name of an option (wildcard "*" is allowed)
value: new value for option
diff: display only changed options
@@ -787,7 +787,7 @@ Examples:
----
/unset <option>
-option: name of an option (may begin or end with "*" to mass-reset options, use carefully!)
+option: name of an option (wildcard "*" is allowed to mass-reset options, use carefully!)
According to option, it's reset (for standard options) or removed (for optional settings, like server values).
diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt
index 18552e876..1ffead404 100644
--- a/doc/en/autogen/user/weechat_options.txt
+++ b/doc/en/autogen/user/weechat_options.txt
@@ -554,7 +554,7 @@
** values: any string (default value: `""`)
* [[option_weechat.look.highlight_tags]] *weechat.look.highlight_tags*
-** description: `comma separated list of tags to highlight; case insensitive comparison; each tag can start or end with "*" to match more than one tag; many tags can be separated by "+" to make a logical "and" between tags; examples: "nick_flashcode" for messages from nick "FlashCode", "irc_notice+nick_toto*" for notices from a nick starting with "toto"`
+** description: `comma separated list of tags to highlight; case insensitive comparison; wildcard "*" is allowed in each tag; many tags can be separated by "+" to make a logical "and" between tags; examples: "nick_flashcode" for messages from nick "FlashCode", "irc_notice+nick_toto*" for notices from a nick starting with "toto"`
** type: string
** values: any string (default value: `""`)
@@ -899,7 +899,7 @@
** values: any string (default value: `""`)
* [[option_weechat.plugin.autoload]] *weechat.plugin.autoload*
-** description: `comma separated list of plugins to load automatically at startup, "*" means all plugins found, a name beginning with "!" is a negative value to prevent a plugin from being loaded, names can start or end with "*" to match several plugins (examples: "*" or "*,!lua,!tcl")`
+** description: `comma separated list of plugins to load automatically at startup, "*" means all plugins found, a name beginning with "!" is a negative value to prevent a plugin from being loaded, wildcard "*" is allowed in names (examples: "*" or "*,!lua,!tcl")`
** type: string
** values: any string (default value: `"*"`)
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 21f813f51..42c6dfc5a 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -809,6 +809,8 @@ length = weechat.strlen_screen("é") # 1
==== weechat_string_match
+_Updated in 0.4.4._
+
Check if a string matches a mask.
Prototype:
@@ -822,10 +824,14 @@ int weechat_string_match (const char *string, const char *mask,
Arguments:
* 'string': string
-* 'mask': mask, can begin or end with "`*`" (no other "`*`" are allowed inside
- mask)
+* 'mask': mask with wildcards ("*"), each wildcard matches 0 or more chars in
+ the string
* 'case_sensitive': 1 for case sensitive comparison, otherwise 0
+[NOTE]
+Since version 0.4.4, wildcards are allowed inside the mask
+(not only beginning/end of mask).
+
Return value:
* 1 if string matches mask, otherwise 0
@@ -834,10 +840,11 @@ C example:
[source,C]
----
-int match1 = weechat_string_match ("abcdef", "abc*", 0); /* == 1 */
-int match2 = weechat_string_match ("abcdef", "*dd*", 0); /* == 0 */
-int match3 = weechat_string_match ("abcdef", "*def", 0); /* == 1 */
-int match4 = weechat_string_match ("abcdef", "*de*", 0); /* == 1 */
+int match1 = weechat_string_match ("abcdef", "abc*", 0); /* == 1 */
+int match2 = weechat_string_match ("abcdef", "*dd*", 0); /* == 0 */
+int match3 = weechat_string_match ("abcdef", "*def", 0); /* == 1 */
+int match4 = weechat_string_match ("abcdef", "*de*", 0); /* == 1 */
+int match5 = weechat_string_match ("abcdef", "*b*d*", 0); /* == 1 */
----
Script (Python):
@@ -848,10 +855,11 @@ Script (Python):
match = weechat.string_match(string, mask, case_sensitive)
# examples
-match1 = weechat.string_match("abcdef", "abc*", 0) # 1
-match2 = weechat.string_match("abcdef", "*dd*", 0) # 0
-match3 = weechat.string_match("abcdef", "*def", 0) # 1
-match4 = weechat.string_match("abcdef", "*de*", 0) # 1
+match1 = weechat.string_match("abcdef", "abc*", 0) # 1
+match2 = weechat.string_match("abcdef", "*dd*", 0) # 0
+match3 = weechat.string_match("abcdef", "*def", 0) # 1
+match4 = weechat.string_match("abcdef", "*de*", 0) # 1
+match5 = weechat.string_match("abcdef", "*b*d*", 0) # 1
----
==== weechat_string_expand_home
@@ -6838,7 +6846,7 @@ struct t_hook *weechat_hook_command_run (const char *command,
Arguments:
-* 'command': command to hook, can start or end with "*" as wildcard
+* 'command': command to hook (wildcard "*" is allowed)
(priority allowed, see note about <<hook_priority,priority>>)
* 'callback': function called when command is run, arguments and return value:
** 'void *data': pointer
@@ -7571,7 +7579,7 @@ Arguments:
* 'tags': catch only messages with these tags (optional):
** with WeeChat ≥ 0.4.3: comma-separated list of tags that must be in message
(logical "or"); it is possible to combine many tags as a logical "and" with
- separator "+"; each tag can start or end with "*" to match many tags
+ separator "+"; wildcard "*" is allowed in tags
** with WeeChat ≤ 0.4.2: comma-separated list of tags that must all be in
message (logical "and")
* 'message': only messages with this string will be caught (optional, case
@@ -7651,7 +7659,7 @@ struct t_hook *weechat_hook_signal (const char *signal,
Arguments:
-* 'signal': signal to catch, can begin or end with "*"
+* 'signal': signal to catch, wildcard "*" is allowed
(priority allowed, see note about <<hook_priority,priority>>)
(see table below)
* 'callback': function called when signal is received, arguments and return
@@ -8507,7 +8515,7 @@ struct t_hook *weechat_hook_hsignal (const char *signal,
Arguments:
-* 'signal': signal to catch, can begin or end with "*"
+* 'signal': signal to catch, wildcard "*" is allowed
(priority allowed, see note about <<hook_priority,priority>>)
(see table below)
* 'callback': function called when signal is received, arguments and return
@@ -8863,7 +8871,7 @@ struct t_hook *weechat_hook_config (const char *option,
Arguments:
* 'option': option, format is full name, as used with command `/set` (for
- example: `weechat.look.item_time_format`)
+ example: `weechat.look.item_time_format`), wildcard "*" is allowed
(priority allowed, see note about <<hook_priority,priority>>)
* 'callback': function called when configuration option is changed, arguments
and return value:
@@ -10772,7 +10780,7 @@ Arguments:
* 'string': comma-separated list of buffers:
** "*" means all buffers
** name beginning with "!" is excluded
-** name can start or end with "*" to match many buffers
+** wildcard "*" is allowed in name
Return value: