summaryrefslogtreecommitdiff
path: root/doc/en/autogen/user/weechat_commands.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-10-09 21:12:02 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-10-09 21:12:02 +0200
commit8da3458f4cb6c806dc399bf828f97ad60dadaf1d (patch)
tree0971f7567b96e247047a0a4bc4e022c1e9e356e1 /doc/en/autogen/user/weechat_commands.adoc
parent82697714e1b51968dc852c9194deb2e0bf159596 (diff)
downloadweechat-8da3458f4cb6c806dc399bf828f97ad60dadaf1d.zip
core: add repeat of string in evaluation of expressions with "repeat:count,string" (closes #958)
Diffstat (limited to 'doc/en/autogen/user/weechat_commands.adoc')
-rw-r--r--doc/en/autogen/user/weechat_commands.adoc19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc
index fa1728803..5967c85f2 100644
--- a/doc/en/autogen/user/weechat_commands.adoc
+++ b/doc/en/autogen/user/weechat_commands.adoc
@@ -297,14 +297,15 @@ Some variables are replaced in expression, using the format ${variable}, variabl
4. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
- 6. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 7. an info (format: "info:name,arguments", arguments are optional)
- 8. current date/time (format: "date" or "date:format")
- 9. an environment variable (format: "env:XXX")
- 10. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 11. an option (format: "file.section.option")
- 12. a local variable in buffer
- 13. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 6. a repeated string (format: "repeat:count,string")
+ 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 8. an info (format: "info:name,arguments", arguments are optional)
+ 9. current date/time (format: "date" or "date:format")
+ 10. an environment variable (format: "env:XXX")
+ 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 12. an option (format: "file.section.option")
+ 13. a local variable in buffer
+ 14. 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:
@@ -329,6 +330,8 @@ Examples (simple strings):
/eval -n ${cut:+3,+,test} ==> te+
/eval -n ${date:%H:%M:%S} ==> 07:46:40
/eval -n ${if:${info:term_width}>80?big:small} ==> big
+ /eval -n ${rev:Hello} ==> olleH
+ /eval -n ${repeat:5,-} ==> -----
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0