diff options
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/autogen/user/weechat_commands.asciidoc | 8 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.asciidoc | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/en/autogen/user/weechat_commands.asciidoc b/doc/en/autogen/user/weechat_commands.asciidoc index d5031c4f6..999b4f38e 100644 --- a/doc/en/autogen/user/weechat_commands.asciidoc +++ b/doc/en/autogen/user/weechat_commands.asciidoc @@ -280,9 +280,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl 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. + 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. 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: @@ -292,6 +293,7 @@ For name of hdata and variables, please look at "Plugin API reference", function Examples (simple strings): /eval -n ${info:version} ==> 0.4.3 + /eval -n ${env:HOME} ==> /home/user /eval -n ${weechat.look.scroll_amount} ==> 3 /eval -n ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc index 001053c5c..ceef1bb94 100644 --- a/doc/en/weechat_plugin_api.en.asciidoc +++ b/doc/en/weechat_plugin_api.en.asciidoc @@ -1938,6 +1938,12 @@ expanded to last): `1.0` + `lightblue` +| `${env:NAME}` + + (_WeeChat ≥ 1.2_) | + Value of the environment variable `NAME` | + `${env:HOME}` | + `/home/user` + | `${sec.data.name}` | Value of the secured data `name` | `${sec.data.freenode_pass}` | |