1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

core: allow pointer as list name in evaluation of hdata (closes #450)

This commit is contained in:
Sébastien Helleu
2015-06-23 20:55:52 +02:00
parent 43f471b9c2
commit a79c0fcff3
27 changed files with 301 additions and 157 deletions
@@ -286,8 +286,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl
8. 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:
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
+7
View File
@@ -3399,6 +3399,13 @@ is added in hashtable:
| arguments | string | Arguments of command (includes value of 'channel')
|===
When the data is a pointer, the variable `tg_signal_data` can be used like this
to read a hdata property (in this example this is a pointer on a buffer):
----
${buffer[${tg_signal_data}].full_name}
----
[[trigger_data_hsignal]]
===== Hsignal