From 88aa82d67256f95051c77acf2ce6e0f3bb4edbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 6 Oct 2019 09:13:35 +0200 Subject: core: add support of modifiers in evaluation of expressions with "modifier:name,data,string" (issue #60) --- doc/en/autogen/user/weechat_commands.adoc | 17 +++++++++-------- doc/en/weechat_plugin_api.en.adoc | 9 +++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'doc/en') diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index a84d1b074..757f4bae5 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -305,14 +305,15 @@ Some variables are replaced in expression, using the format ${variable}, variabl 6. a repeated string (format: "repeat:count,string") 7. length of a string (format: "length:xxx" or "lengthscr:xxx") 8. a color (format: "color:xxx", see "Plugin API reference", function "color") - 9. an info (format: "info:name,arguments", arguments are optional) - 10. current date/time (format: "date" or "date:format") - 11. an environment variable (format: "env:XXX") - 12. a ternary operator (format: "if:condition?value_if_true:value_if_false") - 13. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") - 14. an option (format: "file.section.option") - 15. a local variable in buffer - 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 9. a modifier (format: "modifier:name,data,string") + 10. an info (format: "info:name,arguments", arguments are optional) + 11. current date/time (format: "date" or "date:format") + 12. an environment variable (format: "env:XXX") + 13. a ternary operator (format: "if:condition?value_if_true:value_if_false") + 14. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") + 15. an option (format: "file.section.option") + 16. a local variable in buffer + 17. 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: diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 4f2b34e08..3f770616d 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2515,6 +2515,15 @@ expanded to last): `+red text+` (in red) + `+bold orange text+` (in bold orange) +| `+${modifier:name,data,string}+` + + (_WeeChat ≥ 2.7_) | + Result of a modifier, see function + <<_hook_modifier_exec,hook_modifier_exec>>. | + `+${modifier:eval_path_home,,~}+` + + `+${modifier:eval_path_home,,%h/python}+` | + `+/home/xxx+` + + `+/home/xxx/.weechat/python+` + | `+${info:name}+` + `+${info:name,arguments}+` + (_WeeChat ≥ 0.4.3_) | -- cgit v1.2.3