diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-08-03 19:46:41 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-08-03 19:46:41 +0200 |
commit | d89c4f559c817a92da94d98baf9f3829238b0392 (patch) | |
tree | 552415606ad46f35bf20cb5d6d376b78b9c480f6 /doc/ja/includes/autogen_user_commands.ja.adoc | |
parent | 0be4020b68e54cbb6fd588175419843b7873f900 (diff) | |
download | weechat-d89c4f559c817a92da94d98baf9f3829238b0392.zip |
api: add random integer number in evaluation of expressions with "random:min,max"
Diffstat (limited to 'doc/ja/includes/autogen_user_commands.ja.adoc')
-rw-r--r-- | doc/ja/includes/autogen_user_commands.ja.adoc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index 21aca71da..d180d219b 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -1389,10 +1389,11 @@ Some variables are replaced in expression, using the format ${variable}, variabl 15. an environment variable (format: "env:XXX") 16. a ternary operator (format: "if:condition?value_if_true:value_if_false") 17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") - 18. a translated string (format: "translate:xxx") - 19. an option (format: "file.section.option") - 20. a local variable in buffer - 21. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 18. a random integer number (format: "random:min,max") + 19. a translated string (format: "translate:xxx") + 20. an option (format: "file.section.option") + 21. a local variable in buffer + 22. 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/pointer/pointer name, for example: @@ -1424,6 +1425,7 @@ Examples (simple strings): /eval -n ${repeat:5,-} ==> ----- /eval -n ${length:test} ==> 4 /eval -n ${calc:(5+2)*3} ==> 21 + /eval -n ${random:0,10} ==> 3 /eval -n ${base_encode:64,test} ==> dGVzdA== /eval -n ${base_decode:64,dGVzdA==} ==> test /eval -n ${translate:Plugin} ==> Extension |