summaryrefslogtreecommitdiff
path: root/doc/en/autogen/user
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-27 21:14:51 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-03-27 21:14:51 +0200
commitf99c866f352c9bc7f3ba0e7d228a5942dd616de0 (patch)
tree3180f347e130d6b41e9863902fe8404d5a28e4a4 /doc/en/autogen/user
parentf37ecbfefd63d1966a877b3999ab472147282e77 (diff)
downloadweechat-f99c866f352c9bc7f3ba0e7d228a5942dd616de0.zip
core: add cut of string with max chars displayed in evaluation of expressions
The syntax is: ${cutscr:max,suffix,string}. The string is cut after max chars displayed on screen. If the string is cut, the optional suffix is added after.
Diffstat (limited to 'doc/en/autogen/user')
-rw-r--r--doc/en/autogen/user/weechat_commands.adoc3
1 files changed, 3 insertions, 0 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