mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 03:33:12 +02:00
core: add syntax highlighting in evaluation of expressions, add option weechat.color.eval_syntax_colors (issue #2042)
Syntax highlighting (raw string without evaluation): `${raw_hl:xxx}`
Syntax highlighting: `${hl:xxx}`
This commit is contained in:
@@ -2567,7 +2567,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0,
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
|
||||
Evaluate an expression and return result as a string.
|
||||
Special variables with format `+${variable}+` are expanded (see table below).
|
||||
@@ -2900,11 +2900,21 @@ expanded to last):
|
||||
|===
|
||||
| Format | Min WeeChat | Description | Examples
|
||||
|
||||
| `+${raw_hl:xxx}+` | 4.2.0
|
||||
| Raw string (not evaluated), with syntax highlighting (using colors).
|
||||
| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` +
|
||||
== `+${cut:1,,${rev:hello}}+` (with colors)
|
||||
|
||||
| `+${raw:xxx}+` | 3.1
|
||||
| Raw string (not evaluated).
|
||||
| >> `+${raw:${info:version}}+` +
|
||||
== `+${info:version}+`
|
||||
|
||||
| `+${hl:xxx}+` | 4.2.0
|
||||
| String with syntax highlighting (using colors).
|
||||
| >> `+${hl:${file.section.option}}+` +
|
||||
== `+test ${variable}+` (with colors)
|
||||
|
||||
| `+${name}+` | 3.4
|
||||
| User variable (defined with `+${define:name,value}+`).
|
||||
| >> `+${name}+` +
|
||||
|
||||
@@ -2613,7 +2613,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, mis à jour dans la 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8,
|
||||
2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._
|
||||
2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
|
||||
Évaluer l'expression et retourner le résultat sous forme de chaîne.
|
||||
Les variables spéciales avec le format `+${variable}+` sont étendues (voir le
|
||||
@@ -2952,11 +2952,22 @@ première étendue à la dernière) :
|
||||
|===
|
||||
| Format | WeeChat mini | Description | Exemples
|
||||
|
||||
| `+${raw_hl:xxx}+` | 4.2.0
|
||||
| Chaîne brute (non évaluée), avec mise en évidence de la syntaxe (en utilisant
|
||||
des couleurs).
|
||||
| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` +
|
||||
== `+${cut:1,,${rev:hello}}+` (avec des couleurs)
|
||||
|
||||
| `+${raw:xxx}+` | 3.1
|
||||
| Chaîne brute (non évaluée).
|
||||
| >> `+${raw:${info:version}}+` +
|
||||
== `+${info:version}+`
|
||||
|
||||
| `+${hl:xxx}+` | 4.2.0
|
||||
| Chaîne avec mise en évidence de la syntaxe (en utilisant des couleurs).
|
||||
| >> `+${hl:${fichier.section.option}}+` +
|
||||
== `+test ${variable}+` (avec des couleurs)
|
||||
|
||||
| `+${nom}+` | 3.4
|
||||
| Variable définie par l'utilisateur (avec `+${define:nom,valeur}+`).
|
||||
| >> `+${nom}+` +
|
||||
|
||||
@@ -2717,7 +2717,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0,
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
|
||||
Evaluate an expression and return result as a string.
|
||||
Special variables with format `+${variable}+` are expanded (see table below).
|
||||
@@ -3050,11 +3050,21 @@ expanded to last):
|
||||
|===
|
||||
| Format | Min WeeChat | Description | Examples
|
||||
|
||||
| `+${raw_hl:xxx}+` | 4.2.0
|
||||
| Raw string (not evaluated), with syntax highlighting (using colors).
|
||||
| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` +
|
||||
== `+${cut:1,,${rev:hello}}+` (with colors)
|
||||
|
||||
| `+${raw:xxx}+` | 3.1
|
||||
| Raw string (not evaluated).
|
||||
| >> `+${raw:${info:version}}+` +
|
||||
== `+${info:version}+`
|
||||
|
||||
| `+${hl:xxx}+` | 4.2.0
|
||||
| String with syntax highlighting (using colors).
|
||||
| >> `+${hl:${file.section.option}}+` +
|
||||
== `+test ${variable}+` (with colors)
|
||||
|
||||
| `+${name}+` | 3.4
|
||||
| User variable (defined with `+${define:name,value}+`).
|
||||
| >> `+${name}+` +
|
||||
|
||||
@@ -2637,7 +2637,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0,
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
|
||||
式を評価して文字列として返す。`+${variable}+`
|
||||
という書式で書かれた特殊変数は展開されます (以下の表を参照)。
|
||||
@@ -2980,12 +2980,24 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
|
||||
// TRANSLATION MISSING
|
||||
| 書式 | Min WeeChat | 説明 | 例
|
||||
|
||||
// TRANLSATION MISSING
|
||||
| `+${raw_hl:xxx}+` | 4.2.0
|
||||
| Raw string (not evaluated), with syntax highlighting (using colors).
|
||||
| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` +
|
||||
== `+${cut:1,,${rev:hello}}+` (with colors)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| `+${raw:xxx}+` | 3.1
|
||||
| Raw string (not evaluated).
|
||||
| >> `+${raw:${info:version}}+` +
|
||||
== `+${info:version}+`
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| `+${hl:xxx}+` | 4.2.0
|
||||
| String with syntax highlighting (using colors).
|
||||
| >> `+${hl:${file.section.option}}+` +
|
||||
== `+test ${variable}+` (with colors)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| `+${name}+` | 3.4
|
||||
| User variable (defined with `+${define:name,value}+`).
|
||||
|
||||
@@ -2479,7 +2479,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, ажурирано у верзијама 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6 и 3.8, 4.0.0._
|
||||
_WeeChat ≥ 0.4.0, ажурирано у верзијама 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6 и 3.8, 4.0.0, 4.2.0._
|
||||
|
||||
Израчунава израз и враћа вредност као стринг. Специјалне променљиве у формату `+${променљива}+` се развијају (погледајте табелу испод).
|
||||
|
||||
@@ -2789,11 +2789,23 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
|
||||
|===
|
||||
| Формат | Мин WeeChat | Опис | Примери
|
||||
|
||||
// TRANLSATION MISSING
|
||||
| `+${raw_hl:xxx}+` | 4.2.0
|
||||
| Raw string (not evaluated), with syntax highlighting (using colors).
|
||||
| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` +
|
||||
== `+${cut:1,,${rev:hello}}+` (with colors)
|
||||
|
||||
| `+${raw:xxx}+` | 3.1
|
||||
| Сирови стринг (не израчунава се).
|
||||
| >> `+${raw:${info:version}}+` +
|
||||
== `+${info:version}+`
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| `+${hl:xxx}+` | 4.2.0
|
||||
| String with syntax highlighting (using colors).
|
||||
| >> `+${hl:${file.section.option}}+` +
|
||||
== `+test ${variable}+` (with colors)
|
||||
|
||||
| `+${име}+` | 3.4
|
||||
| Корисничка променљива (дефинисана са `+${define:име,вредност}+`).
|
||||
| >> `+${име}+` +
|
||||
|
||||
Reference in New Issue
Block a user