mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
core: add "length:xxx" and "lengthscr:xxx" in evaluation of expressions
This commit is contained in:
+12
-9
@@ -7355,19 +7355,21 @@ command_init ()
|
||||
"\"cutscr:+max,suffix,string\")\n"
|
||||
" 5. a reversed string (format: \"rev:xxx\")\n"
|
||||
" 6. a repeated string (format: \"repeat:count,string\")\n"
|
||||
" 7. a color (format: \"color:xxx\", see \"Plugin API "
|
||||
" 7. length of a string (format: \"length:xxx\" or "
|
||||
"\"lengthscr:xxx\")\n"
|
||||
" 8. a color (format: \"color:xxx\", see \"Plugin API "
|
||||
"reference\", function \"color\")\n"
|
||||
" 8. an info (format: \"info:name,arguments\", arguments are "
|
||||
" 9. an info (format: \"info:name,arguments\", arguments are "
|
||||
"optional)\n"
|
||||
" 9. current date/time (format: \"date\" or \"date:format\")\n"
|
||||
" 10. an environment variable (format: \"env:XXX\")\n"
|
||||
" 11. a ternary operator (format: "
|
||||
" 10. current date/time (format: \"date\" or \"date:format\")\n"
|
||||
" 11. an environment variable (format: \"env:XXX\")\n"
|
||||
" 12. a ternary operator (format: "
|
||||
"\"if:condition?value_if_true:value_if_false\")\n"
|
||||
" 12. result of an expression with parentheses and operators "
|
||||
" 13. result of an expression with parentheses and operators "
|
||||
"+ - * / // % (format: \"calc:xxx\")\n"
|
||||
" 13. an option (format: \"file.section.option\")\n"
|
||||
" 14. a local variable in buffer\n"
|
||||
" 15. a hdata name/variable (the value is automatically converted "
|
||||
" 14. an option (format: \"file.section.option\")\n"
|
||||
" 15. a local variable in buffer\n"
|
||||
" 16. a hdata name/variable (the value is automatically converted "
|
||||
"to string), by default \"window\" and \"buffer\" point to current "
|
||||
"window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
@@ -7403,6 +7405,7 @@ command_init ()
|
||||
" /eval -n ${if:${info:term_width}>80?big:small} ==> big\n"
|
||||
" /eval -n ${rev:Hello} ==> olleH\n"
|
||||
" /eval -n ${repeat:5,-} ==> -----\n"
|
||||
" /eval -n ${length:test} ==> 4\n"
|
||||
" /eval -n ${calc:(5+2)*3} ==> 21\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
|
||||
Reference in New Issue
Block a user