summaryrefslogtreecommitdiff
path: root/doc/it/autogen/user/weechat_commands.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/it/autogen/user/weechat_commands.asciidoc')
-rw-r--r--doc/it/autogen/user/weechat_commands.asciidoc44
1 files changed, 23 insertions, 21 deletions
diff --git a/doc/it/autogen/user/weechat_commands.asciidoc b/doc/it/autogen/user/weechat_commands.asciidoc
index 53de0792e..0fd27d73c 100644
--- a/doc/it/autogen/user/weechat_commands.asciidoc
+++ b/doc/it/autogen/user/weechat_commands.asciidoc
@@ -260,11 +260,12 @@ To force a string comparison, add double quotes around each expression, for exam
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. a string with escaped chars (format: "esc:xxx" or "\xxx")
- 2. a color (format: "color:xxx")
- 3. an info (format: "info:name,arguments", arguments are optional)
- 4. an option (format: "file.section.option")
- 5. a local variable in buffer
- 6. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 2. a string with chars to hide (format: "hide:char,string")
+ 3. a color (format: "color:xxx")
+ 4. an info (format: "info:name,arguments", arguments are optional)
+ 5. an option (format: "file.section.option")
+ 6. a local variable in buffer
+ 7. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -273,23 +274,24 @@ Format for hdata can be one of following:
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Examples (simple strings):
- /eval -n ${info:version} ==> 0.4.3
- /eval -n ${weechat.look.scroll_amount} ==> 3
- /eval -n ${window} ==> 0x2549aa0
- /eval -n ${window.buffer} ==> 0x2549320
- /eval -n ${window.buffer.full_name} ==> core.weechat
- /eval -n ${window.buffer.number} ==> 1
- /eval -n ${\t} ==> <tab>
+ /eval -n ${info:version} ==> 0.4.3
+ /eval -n ${weechat.look.scroll_amount} ==> 3
+ /eval -n ${window} ==> 0x2549aa0
+ /eval -n ${window.buffer} ==> 0x2549320
+ /eval -n ${window.buffer.full_name} ==> core.weechat
+ /eval -n ${window.buffer.number} ==> 1
+ /eval -n ${\t} ==> <tab>
+ /eval -n ${hide:-,${relay.network.password}} ==> --------
Examples (conditions):
- /eval -n -c ${window.buffer.number} > 2 ==> 0
- /eval -n -c ${window.win_width} > 100 ==> 1
- /eval -n -c (8 > 12) || (5 > 2) ==> 1
- /eval -n -c (8 > 12) && (5 > 2) ==> 0
- /eval -n -c abcd =~ ^ABC ==> 1
- /eval -n -c abcd =~ (?-i)^ABC ==> 0
- /eval -n -c abcd =~ (?-i)^abc ==> 1
- /eval -n -c abcd !~ abc ==> 0
+ /eval -n -c ${window.buffer.number} > 2 ==> 0
+ /eval -n -c ${window.win_width} > 100 ==> 1
+ /eval -n -c (8 > 12) || (5 > 2) ==> 1
+ /eval -n -c (8 > 12) && (5 > 2) ==> 0
+ /eval -n -c abcd =~ ^ABC ==> 1
+ /eval -n -c abcd =~ (?-i)^ABC ==> 0
+ /eval -n -c abcd =~ (?-i)^abc ==> 1
+ /eval -n -c abcd !~ abc ==> 0
----
[[command_weechat_filter]]
@@ -312,7 +314,7 @@ disable: disable filters
del: delete a filter
-all: delete all filters
buffer: comma separated list of buffers where filter is active:
- - this is full name including plugin (example: "irc.freenode.#weechat")
+ - this is full name including plugin (example: "irc.freenode.#weechat" or "irc.server.freenode")
- "*" means all buffers
- a name starting with '!' is excluded
- wildcard "*" is allowed