From 51ed9ec93e7f9562ffdca693f24d3a90c904d019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 18 Apr 2022 13:46:16 +0200 Subject: core: add case conversion in evaluation of expressions (closes #1778) --- doc/ja/includes/autogen_user_commands.ja.adoc | 46 +++++++++++++++------------ 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'doc/ja/includes') diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index f5c1cdba7..0d862c2f7 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -1408,28 +1408,30 @@ Some variables are replaced in expression, using the format ${variable}, variabl 3. an evaluated sub-string (format: "eval:xxx") 4. an evaluated condition (format: "eval_cond:xxx") 5. a string with escaped chars (format: "esc:xxx" or "\xxx") - 6. a string with chars to hide (format: "hide:char,string") - 7. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string") + 6. a string converted to lower case (format: "lower:xxx") + 7. a string converted to upper case (format: "upper:xxx") + 8. a string with chars to hide (format: "hide:char,string") + 9. 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") - 8. a reversed string (format: "rev:xxx" or "revscr:xxx") - 9. a repeated string (format: "repeat:count,string") - 10. length of a string (format: "length:xxx" or "lengthscr:xxx") - 11. split of a string (format: "split:number,separators,flags,xxx") - 12. split of shell argmuents (format: "split_shell:number,xxx") - 13. a color (format: "color:xxx", see "Plugin API reference", function "color") - 14. a modifier (format: "modifier:name,data,string") - 15. an info (format: "info:name,arguments", arguments are optional) - 16. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx") - 17. current date/time (format: "date" or "date:format") - 18. an environment variable (format: "env:XXX") - 19. a ternary operator (format: "if:condition?value_if_true:value_if_false") - 20. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") - 21. a random integer number (format: "random:min,max") - 22. a translated string (format: "translate:xxx") - 23. define a user variable (format: "define:name,value") - 24. an option (format: "file.section.option") - 25. a local variable in buffer - 26. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 10. a reversed string (format: "rev:xxx" or "revscr:xxx") + 11. a repeated string (format: "repeat:count,string") + 12. length of a string (format: "length:xxx" or "lengthscr:xxx") + 13. split of a string (format: "split:number,separators,flags,xxx") + 14. split of shell argmuents (format: "split_shell:number,xxx") + 15. a color (format: "color:xxx", see "Plugin API reference", function "color") + 16. a modifier (format: "modifier:name,data,string") + 17. an info (format: "info:name,arguments", arguments are optional) + 18. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx") + 19. current date/time (format: "date" or "date:format") + 20. an environment variable (format: "env:XXX") + 21. a ternary operator (format: "if:condition?value_if_true:value_if_false") + 22. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") + 23. a random integer number (format: "random:min,max") + 24. a translated string (format: "translate:xxx") + 25. define a user variable (format: "define:name,value") + 26. an option (format: "file.section.option") + 27. a local variable in buffer + 28. 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: @@ -1452,6 +1454,8 @@ Examples (simple strings): /eval -n ${window.buffer.full_name} ==> core.weechat /eval -n ${window.buffer.number} ==> 1 /eval -n ${\t} ==> + /eval -n ${lower:TEST} ==> test + /eval -n ${upper:test} ==> TEST /eval -n ${hide:-,${relay.network.password}} ==> -------- /eval -n ${cut:3,+,test} ==> tes+ /eval -n ${cut:+3,+,test} ==> te+ -- cgit v1.2.3