diff options
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/autogen/user/weechat_commands.adoc | 3 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index c1d29443d..94e599fd5 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -286,6 +286,7 @@ Some variables are replaced in expression, using the format ${variable}, variabl 2. a string with escaped chars (format: "esc:xxx" or "\xxx") 3. a string with chars to hide (format: "hide:char,string") 4. a string with max chars (format: "cut:max,suffix,string") + or max chars displayed on screen (format: "cutscr:max,suffix,string") 5. a color (format: "color:xxx") 6. an info (format: "info:name,arguments", arguments are optional) 7. current date/time (format: "date" or "date:format") @@ -314,6 +315,8 @@ Examples (simple strings): /eval -n ${\t} ==> <tab> /eval -n ${hide:-,${relay.network.password}} ==> -------- /eval -n ${cut:2,+,test} ==> te+ + /eval -n ${cut:2,+,こんにちは世界} ==> こん+ + /eval -n ${cutscr:2,+,こんにちは世界} ==> こ+ /eval -n ${date:%H:%M:%S} ==> 07:46:40 /eval -n ${if:${info:term_width}>80?big:small} ==> big diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 2d0ea9e33..08978f590 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2042,11 +2042,19 @@ expanded to last): | `+${cut:max,suffix,string}+` + (_WeeChat ≥ 1.8_) | - String with `max` chars displayed, and optional `suffix` if string is cut. | + String with `max` chars, and optional `suffix` if string is cut. | `+${cut:4,…,this is a test}+` + - `+${cut:2,>>,àéçôî}+` | + `+${cut:2,>>,こんにちは世界}+` | `+this…+` + - `+àé>>+` + `+こん>>+` + +| `+${cutscr:max,suffix,string}+` + + (_WeeChat ≥ 1.8_) | + String with `max` chars displayed on screen, and optional `suffix` if string is cut. | + `+${cutscr:4,…,this is a test}+` + + `+${cutscr:2,>>,こんにちは世界}+` | + `+this…+` + + `+こ>>+` | `+${re:N}+` | Regex captured group: `0` = whole string matching, `1` to `99` = group |