summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-04 19:41:23 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:18:19 +0100
commit83117f8d2a823b229b96a93d3591704a045eb502 (patch)
treeea00f29e5fdb3b1f2eb5e17792127d69821ddb3e /doc/it/weechat_plugin_api.it.adoc
parent07d16903f3c4f8be84e777a2067085f305e8d2f0 (diff)
downloadweechat-83117f8d2a823b229b96a93d3591704a045eb502.zip
core: add ternary operator (condition) in evaluation of expressions
Diffstat (limited to 'doc/it/weechat_plugin_api.it.adoc')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 1727ba6f5..0b208b799 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -2027,7 +2027,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
==== string_eval_expression
// TRANSLATION MISSING
-_WeeChat ≥ 0.4.0, updated in 0.4.2, 1.0, 1.1, 1.2 and 1.3._
+_WeeChat ≥ 0.4.0, updated in 0.4.2, 1.0, 1.1, 1.2, 1.3 and 1.8._
// TRANSLATION MISSING
Evaluate an expression and return result as a string.
@@ -2098,7 +2098,6 @@ expanded to last):
`+${name}+` |
`+value+`
-// TRANSLATION MISSING
| `+${eval:xxx}+` +
(_WeeChat ≥ 1.3_) |
String to evaluate. |
@@ -2141,7 +2140,6 @@ expanded to last):
`+1.0+` +
`+lightblue+`
-// TRANSLATION MISSING
| `+${date}+` +
`+${date:xxx}+` +
(_WeeChat ≥ 1.3_) |
@@ -2158,6 +2156,16 @@ expanded to last):
`+${env:HOME}+` |
`+/home/user+`
+| `+${if:condition}+` +
+ `+${if:condition?true}+`
+ `+${if:condition?true:false}+` +
+ (_WeeChat ≥ 1.8_) |
+ Ternary operator with a condition, a value if the condition is true (optional)
+ and another value if the condition is false (optional). If values are not
+ given, "1" or "0" are returned, according to the result of the condition. |
+ `+${if:${info:term_width}>80?big:small}+` |
+ `+big+`
+
| `+${sec.data.name}+` |
Value of the secured data `name`. |
`+${sec.data.freenode_pass}+` |