summaryrefslogtreecommitdiff
path: root/doc/en/autogen
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-06-30 20:25:35 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-06-30 20:25:35 +0200
commit9bf40517d3fdc48befec9ea4030338e8e98b1852 (patch)
tree0142fb829326ce8305217899ca9dd5a725100792 /doc/en/autogen
parente92a63427f2f3d45646cf0ffc107cf3f0a279f84 (diff)
downloadweechat-9bf40517d3fdc48befec9ea4030338e8e98b1852.zip
api: add support of evaluated sub-strings and current date/time in function string_eval_expression() and command /eval
Diffstat (limited to 'doc/en/autogen')
-rw-r--r--doc/en/autogen/user/weechat_commands.asciidoc19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/en/autogen/user/weechat_commands.asciidoc b/doc/en/autogen/user/weechat_commands.asciidoc
index 9ff20bc01..aea0caa96 100644
--- a/doc/en/autogen/user/weechat_commands.asciidoc
+++ b/doc/en/autogen/user/weechat_commands.asciidoc
@@ -276,14 +276,16 @@ To force a string comparison, add double quotes around each expression, for exam
"50" > "100" ==> 1
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 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 environment variable (format: "env:XXX")
- 6. an option (format: "file.section.option")
- 7. a local variable in buffer
- 8. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 1. an evaluated sub-string (format: "eval:xxx")
+ 2. a string with escaped chars (format: "esc:xxx" or "\xxx")
+ 3. a string with chars to hide (format: "hide:char,string")
+ 4. a color (format: "color:xxx")
+ 5. an info (format: "info:name,arguments", arguments are optional)
+ 6. current date/time (format: "date" or "date:format")
+ 7. an environment variable (format: "env:XXX")
+ 8. an option (format: "file.section.option")
+ 9. a local variable in buffer
+ 10. 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:
@@ -303,6 +305,7 @@ Examples (simple strings):
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/eval -n ${hide:-,${relay.network.password}} ==> --------
+ /eval -n ${date:%H:%M:%S} ==> 07:46:40
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0