summaryrefslogtreecommitdiff
path: root/doc/en/autogen/user/weechat_commands.asciidoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-04-26 11:50:39 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-04-26 11:50:39 +0200
commit6b2c9d2cb8ae0057faffd29fc61b0ab67ae71c7f (patch)
tree44514243a47699ae64bb14dc21e243b549698ecb /doc/en/autogen/user/weechat_commands.asciidoc
parent80f446a4b40cf93c431bcd6110d5386a46ddb5b2 (diff)
downloadweechat-6b2c9d2cb8ae0057faffd29fc61b0ab67ae71c7f.zip
api: add support of environment variables in function string_eval_expression() and command /eval (issue #388)
Diffstat (limited to 'doc/en/autogen/user/weechat_commands.asciidoc')
-rw-r--r--doc/en/autogen/user/weechat_commands.asciidoc8
1 files changed, 5 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