1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

core: add case conversion in evaluation of expressions (closes #1778)

This commit is contained in:
Sébastien Helleu
2022-04-18 13:46:16 +02:00
parent 46033a7ee9
commit 51ed9ec93e
30 changed files with 7594 additions and 4617 deletions
+1
View File
@@ -21,6 +21,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
* core: add bar item "spacer" (issue #1700)
* core: add case conversion in evaluation of expressions with `lower:string` and `upper:string` (issue #1778)
Bug fixes::
+117 -113
View File
@@ -1366,126 +1366,130 @@ infolists: zeigt Information über die Infolists an
/eval [-n|-s] [-d] <expression>
[-n] [-d [-d]] -c <expression1> <operator> <expression2>
-n: gibt das Ergebnis aus, ohne dass dieses in den Buffer gesendet wird (debug Modus)
-s: teilt Ausdrücke, bevor sie evaluiert werden (mehrere Befehle können durch Semikolon getrennt werden)
-d: eine Debug-Ausgabe nach Auswertung anzeigen (Nutzung von zwei -d: ausführliche Debug-Ausgabe)
-c: Auswertung als Bedingung: nutzt Operatoren und runde Klammern, Rückgabewert als Boolean-Wert ("0" oder "1")
expression: Ausdruck welcher verarbeitet werden soll. Variablen im Format ${variable} werden ersetzt (siehe unten); mehrere Befehle werden durch ein Semikolon voneinander getrennt
operator: ein logischer oder vergleichender Operand:
- logische Operanden:
&& boolean "und"
|| boolean "oder"
- vergleichende Operanden:
== gleich
!= ungleich
<= kleiner oder gleich
< kleiner
>= größer oder gleich
> größer
=~ stimmt mit regulärem POSIX Ausdruck überein
!~ stimmt NICHT mit regulärem POSIX Ausdruck überein
==* stimmt mit Maske überein (Platzhalter "*" ist erlaubt)
!!* stimmt mit Maske NICHT überein (Platzhalter "*" ist erlaubt)
=* stimmt mit Maske überein, Groß- und Kleinschreibung wird nicht beachtet (Platzhalter "*" ist erlaubt)
!* stimmt mit Maske NICHT überein, Groß- und Kleinschreibung wird nicht beachtet (Platzhalter "*" ist erlaubt)
==- ist enthalten, Groß- und Kleinschreibung wird beachtet
!!- ist NICHT enthalten, Groß- und Kleinschreibung wird beachtet
=- ist enthalten, Groß- und Kleinschreibung wird nicht beachtet
!- ist NICHT enthalten, Groß- und Kleinschreibung wird nicht beachtet
-n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation (with two -d: more verbose debug)
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
operator: a logical or comparison operator:
- logical operators:
&& boolean "and"
|| boolean "or"
- comparison operators:
== equal
!= not equal
<= less or equal
< less
>= greater or equal
> greater
=~ is matching POSIX extended regex
!~ is NOT matching POSIX extended regex
==* is matching mask, case sensitive (wildcard "*" is allowed)
!!* is NOT matching mask, case sensitive (wildcard "*" is allowed)
=* is matching mask, case insensitive (wildcard "*" is allowed)
!* is NOT matching mask, case insensitive (wildcard "*" is allowed)
==- is included, case sensitive
!!- is NOT included, case sensitive
=- is included, case insensitive
!- is NOT included, case insensitive
Ein Ausdruck gilt als "wahr" sofern das Ergebnis weder NULL, nicht leer und von "0" abweichend ist.
Für einen Vergleich werden Fließkommazahlen genutzt, insofern es sich bei beiden Ausdrücken um gültige Zahlen handelt, folgende Formate werden unterstützt:
- Integer (Beispiele: 5, -7)
- Fließkommazahl (Beispiele: 5.2, -7.5, 2.83e-2)
- hexadezimale Zahl (Beispiele: 0xA3, -0xA3)
Um einen Vergleich zwischen zwei Zeichenketten zu erzwingen, müssen die Ausdrücke in Anführungszeichen gesetzt werden, zum Beispiel:
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- integer (examples: 5, -7)
- floating point number (examples: 5.2, -7.5, 2.83e-2)
- hexadecimal number (examples: 0xA3, -0xA3)
To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0
"50" > "100" ==> 1
Einige Variablen werden im Ausdruck mittels der Formatierung ${variable} ersetzt. Mögliche Variablen sind, nach Reihenfolge ihrer Priorität:
1. die Zeichenfolge selbst ohne Auswertung (Format: "raw:xxx")
2. eine benutzerdefinierte Variable (Format: "name")
3. eine evaluierte Teilzeichenkette (Format: "eval:xxx")
4. eine evaluierte Bedingung (Format: "eval_cond:xxx")
5. eine Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx")
6. Zeichen, die in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette")
7. eine Zeichenkette mit einer maximalen Anzahl an Zeichen (Format: "cut:max,suffix,string" oder "cut:+max,suffix,string")
oder maximale Anzahl an Zeichen die auf dem Bildschirm angezeigt werden sollen (Format: "cutscr:Max,Suffix,Zeichenkette oder "cutscr:+Max,Suffix,Zeichenkette")
8. eine Zeichenkette umkehren (Format: "rev:xxx" oder "revscr:xxx")
9. eine Zeichenkette wiederholen (Format: "repeat:Anzahl,Zeichenkette")
10. Länge einer Zeichenkette (Format: "length:xxx" oder "lengthscr:xxx")
11. Aufteilen einer Zeichenkette (Format: "split:Anzahl,Trennzeichen,Flags,xxx")
12. Aufteilen von Shell-Argumenten (Format: "split_shell:Anzahl,xxx")
13. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color")
14. zum modifizieren (Format: "modifier:name,data,string")
15. eine Info (Format: "Info:Name,Argumente", Argumente sind optional)
16. eine Basis 16/32/64 kodierte / dekodierte Zeichenfolge (Format: "base_encode:base,xxx" oder "base_decode:base,xxx")
17. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format")
18. eine Umgebungsvariable (Format: "env:XXX")
19. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr")
20. Ergebnis eines Ausdrucks mit Klammern und Operatoren + - * / // % ** (Format: "calc:xxx")
21. eine zufällige ganze Zahl (Format: "random:min,max")
22. eine übersetzte Zeichenkette (Format: "translate:xxx")
23. eine Benutzervariable definieren (Format: "define:Name,Wert")
24. eine Option (Format: "file.section.option")
25. eine lokale Variable eines Buffers
26. ein(e) hdata - Name/Variable (der Wert wird automatisch in eine Zeichenkette konvertiert), standardmäßig wird für "window" und "buffer" das aktuelle Fenster/Buffer verwendet.
Das Format für hdata kann wie folgt aufgebaut sein:
hdata.var1.var2...: startet mit hdata (der Pointer muss bekannt sein) und fragt eine Variable nach der anderen ab (weitere hdata können folgen)
hdata[list].var1.var2...: startet hdata mittels einer Liste, zum Beispiel:
${buffer[gui_buffers].full_name}: der vollständige Name des ersten Buffers, in der verknüpften Liste aller Buffer
${plugin[weechat_plugins].name}: Name der ersten Erweiterung, in der verknüpften Liste aller Erweiterungen
hdata[pointer].var1.var2...: startet hdata mittels einem Pointer, zum Beispiel:
${buffer[0x1234abcd].full_name}: vollständiger Name eines Buffers und des dazugehörigen Pointers (kann in triggern benutzt werden)
${buffer[my_pointer].full_name}: vollständiger Name des Buffers mit dem entsprechenden Pointernamen (kann in Triggern verwendet werden)
Die vorhandenen Namen für hdata und Variablen sind in der "Anleitung für API Erweiterung", Bereich "weechat_hdata_get". beschrieben
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. the string itself without evaluation (format: "raw:xxx")
2. a user-defined variable (format: "name")
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 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")
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:
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
${buffer[my_pointer].full_name}: full name of the buffer with this pointer name (can be used in triggers)
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Beispiele (einfache Zeichenketten):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.password} ==> geheim
/eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/eval -n ${hide:-,${relay.network.password}} ==> --------
/eval -n ${cut:3,+,test} ==> tes+
/eval -n ${cut:+3,+,test} ==> te+
/eval -n ${date:%H:%M:%S} ==> 07:46:40
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
/eval -n ${base_decode:64,dGVzdA==} ==> test
/eval -n ${translate:Plugin} ==> Erweiterung
Examples (simple strings):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.password} ==> secret
/eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/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+
/eval -n ${date:%H:%M:%S} ==> 07:46:40
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
/eval -n ${base_decode:64,dGVzdA==} ==> test
/eval -n ${translate:Plugin} ==> Extension
/eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8
Beispiele (Bedingungen):
/eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1
/eval -n -c (8 > 12) && (5 > 2) ==> 0
/eval -n -c abcd =~ ^ABC ==> 1
/eval -n -c abcd =~ (?-i)^ABC ==> 0
/eval -n -c abcd =~ (?-i)^abc ==> 1
/eval -n -c abcd !~ abc ==> 0
/eval -n -c abcd =* a*d ==> 1
/eval -n -c abcd =- bc ==> 1
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1
/eval -n -c (8 > 12) && (5 > 2) ==> 0
/eval -n -c abcd =~ ^ABC ==> 1
/eval -n -c abcd =~ (?-i)^ABC ==> 0
/eval -n -c abcd =~ (?-i)^abc ==> 1
/eval -n -c abcd !~ abc ==> 0
/eval -n -c abcd =* a*d ==> 1
/eval -n -c abcd =- bc ==> 1
----
[[command_weechat_filter]]
+25 -21
View File
@@ -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} ==> <tab>
/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+
+11 -1
View File
@@ -2256,7 +2256,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 and 3.4._
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4 and 3.6._
Evaluate an expression and return result as a string.
Special variables with format `+${variable}+` are expanded (see table below).
@@ -2641,6 +2641,16 @@ expanded to last):
>> `+${\ua9}+` +
== `+©+`
| `+${lower:string}+` | 3.6 |
String converted to lower case. |
>> `+${lower:TEST}+` +
>> `+test+`
| `+${upper:string}+` | 3.6 |
String converted to upper case. |
>> `+${upper:test}+` +
>> `+TEST+`
| `+${hide:x,string}+` | 1.1 |
String with hidden chars (all chars in `string` replaced by `x`). |
>> `+${hide:*,password}+` +
+25 -21
View File
@@ -1408,28 +1408,30 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia
3. une sous-chaîne évaluée (format : "eval:xxx")
4. une condition évaluée (format : "eval_cond:xxx")
5. une chaîne avec les caractères échappés (format : "esc:xxx" ou "\xxx")
6. une chaîne avec des caractères à cacher (format : "hide:caractère,chaîne")
7. une chaîne avec un maximum de caractères (format : "cut:max,suffixe,chaîne" ou "cut:+max,suffixe,chaîne")
6. une chaîne convertie en minuscules (format : "lower:xxx")
7. une chaîne convertie en majuscules (format : "upper:xxx")
8. une chaîne avec des caractères à cacher (format : "hide:caractère,chaîne")
9. une chaîne avec un maximum de caractères (format : "cut:max,suffixe,chaîne" ou "cut:+max,suffixe,chaîne")
ou un maximum de caractères affichés à l'écran (format : "cutscr:max,suffixe,chaîne" ou "cutscr:+max,suffixe,chaîne")
8. une chaîne inversée (format : "rev:xxx" ou "revscr:xxx")
9. une chaîne répétée (format : "repeat:nombre,chaîne")
10. longueur d'une chaîne (format : "length:xxx" ou "lengthscr:xxx")
11. découpage d'une chaîne (format : "split:nombre,séparateurs,flags,xxx")
12. découpage de paramètres shell (format : "split_shell:nombre,xxx")
13. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
14. un modificateur (format : "modifier:nom,données,chaîne")
15. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
16. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "base_encode:base,xxx" ou "base_decode:base,xxx")
17. la date/heure courante (format : "date" ou "date:format")
18. une variable d'environnement (format : "env:XXX")
19. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
20. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % ** (format : "calc:xxx")
21. un nombre entier aléatoire (format : "random:min,max")
22. une chaîne traduite (format : "translate:xxx")
23. déclaration d'une variable utilisateur (format : "define:nom,valeur")
24. une option (format : "fichier.section.option")
25. une variable locale du tampon
26. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
10. une chaîne inversée (format : "rev:xxx" ou "revscr:xxx")
11. une chaîne répétée (format : "repeat:nombre,chaîne")
12. longueur d'une chaîne (format : "length:xxx" ou "lengthscr:xxx")
13. découpage d'une chaîne (format : "split:nombre,séparateurs,flags,xxx")
14. découpage de paramètres shell (format : "split_shell:nombre,xxx")
15. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
16. un modificateur (format : "modifier:nom,données,chaîne")
17. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
18. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "base_encode:base,xxx" ou "base_decode:base,xxx")
19. la date/heure courante (format : "date" ou "date:format")
20. une variable d'environnement (format : "env:XXX")
21. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
22. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % ** (format : "calc:xxx")
23. un nombre entier aléatoire (format : "random:min,max")
24. une chaîne traduite (format : "translate:xxx")
25. déclaration d'une variable utilisateur (format : "define:nom,valeur")
26. une option (format : "fichier.section.option")
27. une variable locale du tampon
28. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
Le format du hdata peut être le suivant :
hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)
hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste/pointeur/nom de pointeur, par exemple :
@@ -1452,6 +1454,8 @@ Exemples (chaînes simples) :
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/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+
+11 -1
View File
@@ -2294,7 +2294,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 et 3.4._
2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4 et 3.6._
É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
@@ -2685,6 +2685,16 @@ première étendue à la dernière) :
>> `+${\ua9}+` +
== `+©+`
| `+${lower:string}+` | 3.6 |
Chaîne convertie en minuscules. |
>> `+${lower:TEST}+` +
>> `+test+`
| `+${upper:string}+` | 3.6 |
Chaîne convertie en majuscules. |
>> `+${upper:test}+` +
>> `+TEST+`
| `+${hide:x,chaîne}+` | 1.1 |
Chaîne avec les caractères masqués (tous les caractères dans `chaîne`
remplacés par `x`). |
+25 -21
View File
@@ -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} ==> <tab>
/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+
+13 -1
View File
@@ -2356,7 +2356,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 and 3.4._
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4 and 3.6._
Evaluate an expression and return result as a string.
Special variables with format `+${variable}+` are expanded (see table below).
@@ -2741,6 +2741,18 @@ expanded to last):
>> `+${\ua9}+` +
== `+©+`
// TRANSLATION MISSING
| `+${lower:string}+` | 3.6 |
String converted to lower case. |
>> `+${lower:TEST}+` +
>> `+test+`
// TRANSLATION MISSING
| `+${upper:string}+` | 3.6 |
String converted to upper case. |
>> `+${upper:test}+` +
>> `+TEST+`
| `+${hide:x,string}+` | 1.1 |
String with hidden chars (all chars in `string` replaced `x`). |
>> `+${hide:*,password}+` +
+25 -21
View File
@@ -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} ==> <tab>
/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+
+13 -1
View File
@@ -2280,7 +2280,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 and 3.4._
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4 and 3.6._
式を評価して文字列として返す。`+${variable}+`
という書式で書かれた特殊変数は展開されます (以下の表を参照)。
@@ -2678,6 +2678,18 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
>> `+${\ua9}+` +
== `+©+`
// TRANSLATION MISSING
| `+${lower:string}+` | 3.6 |
String converted to lower case. |
>> `+${lower:TEST}+` +
>> `+test+`
// TRANSLATION MISSING
| `+${upper:string}+` | 3.6 |
String converted to upper case. |
>> `+${upper:test}+` +
>> `+TEST+`
| `+${hide:x,string}+` | 1.1 |
隠す文字を含むテキスト (`string` に含まれる文字をすべて `x` で置換) |
>> `+${hide:*,password}+` +
+99 -95
View File
@@ -1365,100 +1365,104 @@ infolists: wyświetla informacje o infolistach
/eval [-n|-s] [-d] <wyrażenie>
[-n] [-d [-d]] -c <wyrażenie1> <operator> <wyrażenie2>
-n: wyświetla wynik bez wysyłania go do buforu (tryb debugowania)
-s: podziel wyrażenie przed przetworzeniem go (wiele komend może być oddzielonych średnikami)
-d: wyświetl wyjście debugowe po ewaluacji (drugie -d wyświetli więcej informacji)
-c: przetwarza jako warunek: użyj operatorów i nawiasów, zwraca wartość logiczną ("0" lub "1")
wyrażenie: wyrażenie do przetworzenia, zmienne o formacie ${zmienna} są zastępowane (zobacz niżej); wiele komend można oddzielić średnikami
operator: operator logiczny lub porównania:
- operatory logiczne:
&& logiczne „i”
|| logiczne „lub”
- operatory porównania:
== równy
!= różny
<= mniejszy lub równy
< mniejszy
>= większy lub równy
> większy
=~ pasuje do rozszerzonego wyrażenia regularnego POSIX
!~ NIE pasuje do rozszerzonego wyrażenia regularnego POSIX
==* pasuje do maski, rozróżnia wielkość znaków (dzika karta „*” dozwolona)
!!* NIE pasuje do maski, rozróżnia wielkość znaków (dzika karta „*” dozwolona)
=* pasuje do maski, nie rozróżnia wielkość znaków (dzika karta „*” dozwolona)
!* NIE pasuje do maski, nie rozróżnia wielkość znaków (dzika karta „*” dozwolona)
==- jest zawarte, rozróżnia wielkość znaków
!!- NIE jest zawarte,rozróżnia wielkość znaków
=- jest zawarte, nie rozróżnia wielkość znaków
!- NIE jest zawarte, nie rozróżnia wielkość znaków
-n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation (with two -d: more verbose debug)
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
operator: a logical or comparison operator:
- logical operators:
&& boolean "and"
|| boolean "or"
- comparison operators:
== equal
!= not equal
<= less or equal
< less
>= greater or equal
> greater
=~ is matching POSIX extended regex
!~ is NOT matching POSIX extended regex
==* is matching mask, case sensitive (wildcard "*" is allowed)
!!* is NOT matching mask, case sensitive (wildcard "*" is allowed)
=* is matching mask, case insensitive (wildcard "*" is allowed)
!* is NOT matching mask, case insensitive (wildcard "*" is allowed)
==- is included, case sensitive
!!- is NOT included, case sensitive
=- is included, case insensitive
!- is NOT included, case insensitive
Wyrażenie jest uznawane za „prawdziwe” jeśli nie jest NULL, nie jest puste, oraz różni się od „0”.
Porównania dokonuje się z użyciem liczb całkowitych jeśli oba wyrażenia są liczbami całkowitymi, w jednym z następujących formatów:
- liczby całkowite (przykłady: 5, -7)
- liczby zmiennoprzecinkowe (przykłady: 5.2, -7.5, 2.83e-2)
- liczby szesnastkowe (przykłady: 0xA3, -0xA3)
W celu wymuszenia porównywania ciągów, należy umieścić każde wyrażenie w cudzysłowie, na przykład:
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- integer (examples: 5, -7)
- floating point number (examples: 5.2, -7.5, 2.83e-2)
- hexadecimal number (examples: 0xA3, -0xA3)
To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0
"50" > "100" ==> 1
Niektóre zmienne w wyrażeniach są zamieniane, poprzez zastosowanie formatu ${zmienna}, według priorytetu zmienną może być:
1. nieprzetworzony ciąg (format: "raw:xxx")
2. zmienna zdefiniowana przez użytkownika (format: "name")
3. przetworzony ciąg (format: "eval:xxx")
4. przetworzony warunek (format: "eval_cond:xxx")
5. ciąg z wyescapowanymi znakami (format: "esc:xxx" lub "\xxx")
6. ciąg ze znakami do ukrycia (format: "hide:char,string")
7. ciąg o maksymalnej długości (format: "cut:max,suffix,string" lub "cut:+max,suffix,string")
lub maksymalna ilość znaków wyświetlanych na ekranie (format: "cutscr:max,suffix,string" lub "cutscr:+max,suffix,string")
8. odwrócony ciąg (format: "rev:xxx")
9. powtórzony ciąg (format: "repeat:ilość,ciąg")
10. długość ciągu (format: "length:xxx" or "lengthscr:xxx")
11. podział ciągu (format: "split:number,separators,flags,xxx")
12. podział argumentów powłoki (format: "split_shell:number,xxx")
13. kolor (format "color:xxx", zobacz „Opis API wtyczek”, funkcja "color")
14. modyfikator (format: "modifier:name,data,string")
15. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne)
16. ciąg zakodowany/zdekodowany z base 16/32/64 (format: "base_encode:base,xxx" lub "base_decode:base,xxx")
17. obecna data/czas (format: "date" lub "date:format")
18. zmienna środowiskowa (format: "env:XXX")
19. wyrażenie warunkowe (format: "if:warunek?wartość_jeśli_prawda:wartość_jeśli_fałsz")
20. wynik wyrażenia z nawiasami i operatorami + - * / // % ** (format: "calc:xxx")
21. losowa liczba całkowita (format: "random:min,max")
22. przetłumaczony ciąg (format: "translate:xxx")
23. definiowanie zmiennej użytkownika (format: "define:nazwa,wartość")
24. opcja (format: plik.sekcja.opcja)
25. zmienna lokalna w buforze
26. nazwa hdatay/zmiennej (wartość jest automatycznie konwertowana na ciąg znaków), domyślnie „window” i „buffer” wskazują na aktualne okno/bufor.
Format dla hdata może być jednym z poniższych:
hdata.zmienna1.zmienna2...: inicjuje hdata (wskaźnik musi być znany), następnie wypytuje zmienne jedna po drugiej (inne hdata mogą być następne)
hdata[list].zmienna1.zmienna2...: inicjuje hdata z wykorzystaniem listy, na przykład:
${buffer[gui_buffers].full_name}: pełna nazwa buforu w połączonej liście buforów
${plugin[weechat_plugins].name}: nazwa pierwszej wtyczki w połączonej liście wtyczek
hdata[wskaźnik].zmienna1.zmienna2...: zacznij z hdata używając wskaźnika, na przykład:
${buffer[0x1234abcd].full_name}: pełna nazwa buforu z tym wskaźnikiem (może zostać użyte w triggerach)
${buffer[my_pointer].full_name}: pełna nazwa buforu z jego wskaźnikiem (może zostać użyte w triggerach)
Nazwy hdata i zmiennych, można znaleźć w „Opisie API wtyczek”, funkcja "weechat_hdata_get".
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. the string itself without evaluation (format: "raw:xxx")
2. a user-defined variable (format: "name")
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 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")
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:
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
${buffer[my_pointer].full_name}: full name of the buffer with this pointer name (can be used in triggers)
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Przykłady (proste ciągi):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.password} ==> secret
/eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/eval -n ${hide:-,${relay.network.password}} ==> --------
/eval -n ${cut:3,+,test} ==> tes+
/eval -n ${cut:+3,+,test} ==> te+
/eval -n ${date:%H:%M:%S} ==> 07:46:40
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
Examples (simple strings):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.password} ==> secret
/eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/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+
/eval -n ${date:%H:%M:%S} ==> 07:46:40
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
@@ -1467,14 +1471,14 @@ Przykłady (proste ciągi):
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
/eval -n ${base_decode:64,dGVzdA==} ==> test
/eval -n ${translate:Plugin} ==> Wtyczka
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
/eval -n ${base_decode:64,dGVzdA==} ==> test
/eval -n ${translate:Plugin} ==> Extension
/eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8
Przykłady (warunki):
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1
+75 -71
View File
@@ -1366,81 +1366,83 @@ infolists: исписује инфо о инфолистама
/eval [-n|-s] [-d] <израз>
[-n] [-d [-d]] -c <израз1> <оператор> <израз2>
-n: приказује резултат и не шаље га у бафер (дибаг режим)
-s: дели израз пре израчунавања (многе команде могу да се раздвоје са тачка зарезима)
-d: приказује дибаг излаз након израчунавања (са два -d: детаљнији дибаг)
-c: израчунава као услов: користе се оператори и заграде, враћа логичку вредност („0” или „1”)
израз: израз који се израчунава, променљиве у формату ${променљива} се замењују (погледајте испод); више команди може да се раздвоји са тачка зарезима
оператор: логички или оператор поређења:
- логички оператори:
&& логичко „и”
|| логичко „или”
- оператори поређења:
== једнако
!= није једнако
<= мање или једнако
< мање
>= веће или једнако
> веће
=~ подудара се са POSIX проширеним регуларним изразом
!~ НЕ подудара се са POSIX проширеним регуларним изразом
==* је маска подударања, разликује величину слова (дозвољен је џокер „*”)
!!* НИЈЕ маска подударања, разликује величину слова (дозвољен је џокер „*”)
=* је маска подударања, не разликује величину слова (дозвољен је џокер „*”)
!* НИЈЕ маска подударања, не разликује величину слова (дозвољен је џокер „*”)
==- је укључено, разликује величину слова
!!- НИЈЕ укључено, разликује величину слова
=- је укључено, не разликује величину слова
!- НИЈЕ укључено, не разликује величину слова
-n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation (with two -d: more verbose debug)
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
operator: a logical or comparison operator:
- logical operators:
&& boolean "and"
|| boolean "or"
- comparison operators:
== equal
!= not equal
<= less or equal
< less
>= greater or equal
> greater
=~ is matching POSIX extended regex
!~ is NOT matching POSIX extended regex
==* is matching mask, case sensitive (wildcard "*" is allowed)
!!* is NOT matching mask, case sensitive (wildcard "*" is allowed)
=* is matching mask, case insensitive (wildcard "*" is allowed)
!* is NOT matching mask, case insensitive (wildcard "*" is allowed)
==- is included, case sensitive
!!- is NOT included, case sensitive
=- is included, case insensitive
!- is NOT included, case insensitive
Сматра се да је израз „true” ако није NULL, није празан и различит је од „0”.
Поређење се врши употребом бројева у покретном зарезу ако су два израза важећи бројеви, у једном од следећих формата:
- целобројни (примери: 5, -7)
- број у покретном зарезу (примери: 5.2, -7.5, 2.83e-2)
- хексадецимални број (примери: 0xA3, -0xA3)
Ако желите да форсирате поређење стрингова, можете да додате знаке навода око сваког израза, на пример:
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- integer (examples: 5, -7)
- floating point number (examples: 5.2, -7.5, 2.83e-2)
- hexadecimal number (examples: 0xA3, -0xA3)
To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0
"50" > "100" ==> 1
У изразима се замењују неке променљиве, користећи формат ${променљива}, променљива може да буде, према редоследу приоритета:
1. сам стринг без израчунавања (формат: raw:xxx)
2. кориснички дефинисана променљива (формат: „име”)
3. израчунати под-стринг (формат: eval:xxx)
4. израчунати услов (формат: eval_cond:xxx)
5. стринг са означеним карактерима (формат: esc:xxx” или „\xxx)
6. стринг са карактерима за сакривање (формат: „hide:кар,стринг”)
7. стринг са највише карактера (формат: „cut:макс,суфикс,стринг” или „cut:+макс,суфикс,стринг")
или макс број карактера који се приказује на екрану (формат: „cutscr:макс,суфикс,стринг” или „cutscr:+макс,суфикс,стринг”)
8. обрнути стринг (формат: „rev:xxx” или „revscr:xxx”)
9. поновљени стринг (формат: „repeat:број,стринг”)
10. дужина стринга (формат: „length:xxx” или „lengthscr:xxx)
11. подела стринга (формат: „split:број,сепаратори,заставице,xxx”)
12. подела аргумената љуске (формат: „split_shell:број,xxx)
13. боја (формат: „color:xxx”, погледајте „Референтни приручник API додатака”, функција „color”)
14. модификатор (формат: „modifier:име,подаци,стринг”)
15. инфо (формат: „info:име,аргументи”, аргументи нису обавезни)
16. base 16/32/64 шифриран/дешифрован стринг (формат: „base_encode:основа,xxx” или „base_decode:основа,xxx”)
17. текући датум/време (формат: „date” или „date:формат”)
18. променљива окружења (формат: „env:XXX”)
19. тернарни оператор (формат: „if:услов?вредност_ако_је_тачно:вредност_ако_је_нетачно”)
20. резултат израза са заградама и операторима + - * / // % ** (формат: „calc:xxx”)
21. случајни целобројни број (формат: „random:мин,макс”)
22. преведени стринг (формат: „translate:xxx)
23. дефиниција корисничке промонљиве (формат: „define:име,вредност”)
24. опција (формат: „фајл.секција.опција”)
25. локална променљива у баферу
26. hdata име/променљива (вредност се аутоматски конвертује у стринг), „window” и „buffer” подразумевано показују на текући прозор/бафер.
Формат за hdata може да буде једно од следећег:
hdata.пром1.пром2...: почиње са hdata (показивач мора да буде познат), и пита променљиве једну за другом (могу да следе и остала hdata)
hdata[листа].пром1.пром2...: почиње са hdata користећи листу/показивач/име показивача, на пример:
${buffer[gui_buffers].full_name}: пуно име првог бафера у увезаној листи бафера
${plugin[weechat_plugins].name}: име првог бафера у увезаној листи додатака
hdata[показивач].пром1.пром2...: почиње са hdata користећи показивач, на пример:
${buffer[0x1234abcd].full_name}: пуно име бафера са овим показивачем (може да се користи у окидачима)
${buffer[my_pointer].full_name}: пуно име бафера са овим именом показивача (може да се користи у окидачима)
У вези имена hdata и променљивих, молим вас да погледате „Референтни приручник API додатака”, функцију „weechat_hdata_get”.
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. the string itself without evaluation (format: "raw:xxx")
2. a user-defined variable (format: "name")
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 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")
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:
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
${buffer[my_pointer].full_name}: full name of the buffer with this pointer name (can be used in triggers)
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Примери (једноставни стрингови):
Examples (simple strings):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
@@ -1452,6 +1454,8 @@ infolists: исписује инфо о инфолистама
/eval -n ${window.buffer.full_name} ==> core.weechat
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/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+
@@ -1475,7 +1479,7 @@ infolists: исписује инфо о инфолистама
/eval -n ${translate:Plugin} ==> Extension
/eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8
Примери (услови):
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1
+13 -1
View File
@@ -2162,7 +2162,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._
_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._
Израчунава израз и враћа вредност као стринг. Специјалне променљиве у формату `+${променљива}+` се развијају (погледајте табелу испод).
@@ -2523,6 +2523,18 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
>> `+${\ua9}+` +
== `+©+`
// TRANSLATION MISSING
| `+${lower:string}+` | 3.6 |
String converted to lower case. |
>> `+${lower:TEST}+` +
>> `+test+`
// TRANSLATION MISSING
| `+${upper:string}+` | 3.6 |
String converted to upper case. |
>> `+${upper:test}+` +
>> `+TEST+`
| `+${hide:x,стринг}+` | 1.1 |
Стринг са скривеним карактерима (сви карактери у `стринг` се замењују са `x`). |
>> `+${hide:*,password}+` +
+26 -22
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1603,34 +1603,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1663,6 +1665,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+6032 -3866
View File
File diff suppressed because it is too large Load Diff
+176 -22
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1632,6 +1632,156 @@ msgstr ""
"[-n|-s] [-d] <expresión> || [-n] [-d [-d]] -c <expresión1> <operador> "
"<expresión2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard "
#| "\"*\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. a user-defined variable (format: \"name\")\n"
#| " 3. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 6. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,"
#| "string\" or \"cutscr:+max,suffix,string\")\n"
#| " 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 9. a repeated string (format: \"repeat:count,string\")\n"
#| " 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
#| " 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
#| " 13. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 14. a modifier (format: \"modifier:name,data,string\")\n"
#| " 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 17. current date/time (format: \"date\" or \"date:format\")\n"
#| " 18. an environment variable (format: \"env:XXX\")\n"
#| " 19. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 20. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 21. a random integer number (format: \"random:min,max\")\n"
#| " 22. a translated string (format: \"translate:xxx\")\n"
#| " 23. define a user variable (format: \"define:name,value\")\n"
#| " 24. an option (format: \"file.section.option\")\n"
#| " 25. a local variable in buffer\n"
#| " 26. 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"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /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 ${split:1,,,abc,def,ghi} ==> abc\n"
#| " /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
#| " /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
#| " /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
#| " /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
#| " /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
#| " /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| " /eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@@ -1687,34 +1837,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1747,6 +1899,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+52 -44
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"PO-Revision-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-04-18 13:45+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -1717,34 +1717,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1777,6 +1779,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
@@ -1869,38 +1873,40 @@ msgstr ""
" 4. une condition évaluée (format : \"eval_cond:xxx\")\n"
" 5. une chaîne avec les caractères échappés (format : \"esc:xxx\" ou "
"\"\\xxx\")\n"
" 6. une chaîne avec des caractères à cacher (format : \"hide:caractère,"
" 6. une chaîne convertie en minuscules (format : \"lower:xxx\")\n"
" 7. une chaîne convertie en majuscules (format : \"upper:xxx\")\n"
" 8. une chaîne avec des caractères à cacher (format : \"hide:caractère,"
"chaîne\")\n"
" 7. une chaîne avec un maximum de caractères (format : \"cut:max,suffixe,"
" 9. une chaîne avec un maximum de caractères (format : \"cut:max,suffixe,"
"chaîne\" ou \"cut:+max,suffixe,chaîne\")\n"
" ou un maximum de caractères affichés à l'écran (format : \"cutscr:max,"
"suffixe,chaîne\" ou \"cutscr:+max,suffixe,chaîne\")\n"
" 8. une chaîne inversée (format : \"rev:xxx\" ou \"revscr:xxx\")\n"
" 9. une chaîne répétée (format : \"repeat:nombre,chaîne\")\n"
" 10. longueur d'une chaîne (format : \"length:xxx\" ou \"lengthscr:xxx\")\n"
" 11. découpage d'une chaîne (format : \"split:nombre,séparateurs,flags,"
" 10. une chaîne inversée (format : \"rev:xxx\" ou \"revscr:xxx\")\n"
" 11. une chaîne répétée (format : \"repeat:nombre,chaîne\")\n"
" 12. longueur d'une chaîne (format : \"length:xxx\" ou \"lengthscr:xxx\")\n"
" 13. découpage d'une chaîne (format : \"split:nombre,séparateurs,flags,"
"xxx\")\n"
" 12. découpage de paramètres shell (format : \"split_shell:nombre,xxx\")\n"
" 13. une couleur (format : \"color:xxx\", voir la \"Référence API "
" 14. découpage de paramètres shell (format : \"split_shell:nombre,xxx\")\n"
" 15. une couleur (format : \"color:xxx\", voir la \"Référence API "
"extension\", fonction \"color\")\n"
" 14. un modificateur (format : \"modifier:nom,données,chaîne\")\n"
" 15. une info (format : \"info:nom,paramètres\", les paramètres sont "
" 16. un modificateur (format : \"modifier:nom,données,chaîne\")\n"
" 17. une info (format : \"info:nom,paramètres\", les paramètres sont "
"optionnels)\n"
" 16. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "
" 18. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "
"\"base_encode:base,xxx\" ou \"base_decode:base,xxx\")\n"
" 17. la date/heure courante (format : \"date\" ou \"date:format\")\n"
" 18. une variable d'environnement (format : \"env:XXX\")\n"
" 19. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:"
" 19. la date/heure courante (format : \"date\" ou \"date:format\")\n"
" 20. une variable d'environnement (format : \"env:XXX\")\n"
" 21. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:"
"valeur_si_faux\")\n"
" 20. le résultat d'une expression avec parenthèses et les opérateurs + - "
" 22. le résultat d'une expression avec parenthèses et les opérateurs + - "
"* / // % ** (format : \"calc:xxx\")\n"
" 21. un nombre entier aléatoire (format : \"random:min,max\")\n"
" 22. une chaîne traduite (format : \"translate:xxx\")\n"
" 23. déclaration d'une variable utilisateur (format : \"define:nom,"
" 23. un nombre entier aléatoire (format : \"random:min,max\")\n"
" 24. une chaîne traduite (format : \"translate:xxx\")\n"
" 25. déclaration d'une variable utilisateur (format : \"define:nom,"
"valeur\")\n"
" 24. une option (format : \"fichier.section.option\")\n"
" 25. une variable locale du tampon\n"
" 26. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
" 26. une option (format : \"fichier.section.option\")\n"
" 27. une variable locale du tampon\n"
" 28. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
"par défaut \"window\" et \"buffer\" pointent vers la fenêtre et le tampon "
"courants.\n"
"Le format du hdata peut être le suivant :\n"
@@ -1934,6 +1940,8 @@ msgstr ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2021-12-03 12:02+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1517,34 +1517,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1577,6 +1579,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1614,34 +1614,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1674,6 +1676,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -1698,34 +1698,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1758,6 +1760,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+176 -22
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -1657,6 +1657,156 @@ msgstr ""
"[-n|-s] [-d] <wyrażenie> || [-n] [-d [-d]] -c <wyrażenie1> <operator> "
"<wyrażenie2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard "
#| "\"*\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. a user-defined variable (format: \"name\")\n"
#| " 3. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 6. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,"
#| "string\" or \"cutscr:+max,suffix,string\")\n"
#| " 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 9. a repeated string (format: \"repeat:count,string\")\n"
#| " 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
#| " 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
#| " 13. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 14. a modifier (format: \"modifier:name,data,string\")\n"
#| " 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 17. current date/time (format: \"date\" or \"date:format\")\n"
#| " 18. an environment variable (format: \"env:XXX\")\n"
#| " 19. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 20. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 21. a random integer number (format: \"random:min,max\")\n"
#| " 22. a translated string (format: \"translate:xxx\")\n"
#| " 23. define a user variable (format: \"define:name,value\")\n"
#| " 24. an option (format: \"file.section.option\")\n"
#| " 25. a local variable in buffer\n"
#| " 26. 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"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /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 ${split:1,,,abc,def,ghi} ==> abc\n"
#| " /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
#| " /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
#| " /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
#| " /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
#| " /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
#| " /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| " /eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@@ -1712,34 +1862,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1772,6 +1924,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -1702,34 +1702,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1762,6 +1764,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-01-28 09:35+0100\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1677,34 +1677,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1737,6 +1739,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+26 -22
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2021-12-03 12:02+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1540,34 +1540,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1600,6 +1602,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+181 -28
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-03-21 09:21+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1641,6 +1641,156 @@ msgid ""
"<expression2>"
msgstr "[-n|-s] [-d] <израз> || [-n] [-d [-d]] -c <израз1> <оператор> <израз2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard "
#| "\"*\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. a user-defined variable (format: \"name\")\n"
#| " 3. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 6. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,"
#| "string\" or \"cutscr:+max,suffix,string\")\n"
#| " 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 9. a repeated string (format: \"repeat:count,string\")\n"
#| " 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
#| " 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
#| " 13. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 14. a modifier (format: \"modifier:name,data,string\")\n"
#| " 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 17. current date/time (format: \"date\" or \"date:format\")\n"
#| " 18. an environment variable (format: \"env:XXX\")\n"
#| " 19. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 20. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 21. a random integer number (format: \"random:min,max\")\n"
#| " 22. a translated string (format: \"translate:xxx\")\n"
#| " 23. define a user variable (format: \"define:name,value\")\n"
#| " 24. an option (format: \"file.section.option\")\n"
#| " 25. a local variable in buffer\n"
#| " 26. 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"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /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 ${split:1,,,abc,def,ghi} ==> abc\n"
#| " /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
#| " /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
#| " /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
#| " /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
#| " /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
#| " /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| " /eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@@ -1696,34 +1846,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1756,6 +1908,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
@@ -8195,8 +8349,8 @@ msgid ""
"add [<channel1> [<channel2>...]] || addraw <channel1>[,<channel2>...] "
"[<key1>[,<key2>...]] || del [<channel1> [<channel2>...]] || save || sort"
msgstr ""
"add [<канал1> [<канал2>...]] || addraw <канал1>[,<канал2>...] "
"[<кључ1>[,<кључ2>...]] || del [<кључ1> [<кључ2>...]] || save || sort"
"add [<канал1> [<канал2>...]] || addraw <канал1>[,<канал2>...] [<кључ1>[,"
"<кључ2>...]] || del [<кључ1> [<кључ2>...]] || save || sort"
msgid ""
" add: add current channel or a list of channels (with optional keys) to "
@@ -8224,8 +8378,8 @@ msgstr ""
" add: додаје текући канал или листу канала ( са необавезним кључевима) у "
"autojoin опцију; ако се налазите на каналу и не наведете кључ, он се чита са "
"канала\n"
"addraw: користи се IRC сирови формат (исто као за /join команду): сви "
"канали су раздвојени запетама, небавезни кључеви су раздвојени запетама\n"
"addraw: користи се IRC сирови формат (исто као за /join команду): сви канали "
"су раздвојени запетама, небавезни кључеви су раздвојени запетама\n"
" del: брише текући канал или листу канала из autojoin опције\n"
" канал: име канала\n"
" кључ: кључ за канал\n"
@@ -9541,8 +9695,7 @@ msgstr "канали на свим IRC серверима"
msgid ""
"channels automatically joined on the current server (option \"autojoin\")"
msgstr ""
"канали на текућем серверу којима се аутоматски приступа (опција "
"„autojoin”)"
"канали на текућем серверу којима се аутоматски приступа (опција „autojoin”)"
msgid "privates on all IRC servers"
msgstr "приватни разговори на свим IRC серверима"
+180 -26
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2022-03-12 10:00+0300\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1618,6 +1618,156 @@ msgid ""
"<expression2>"
msgstr "[-n|-s] [-d] <ifade> || [-n] [-d] -c <ifade1> <işleç> <ifade2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard "
#| "\"*\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. a user-defined variable (format: \"name\")\n"
#| " 3. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 6. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,"
#| "string\" or \"cutscr:+max,suffix,string\")\n"
#| " 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 9. a repeated string (format: \"repeat:count,string\")\n"
#| " 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
#| " 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
#| " 13. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 14. a modifier (format: \"modifier:name,data,string\")\n"
#| " 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 17. current date/time (format: \"date\" or \"date:format\")\n"
#| " 18. an environment variable (format: \"env:XXX\")\n"
#| " 19. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 20. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 21. a random integer number (format: \"random:min,max\")\n"
#| " 22. a translated string (format: \"translate:xxx\")\n"
#| " 23. define a user variable (format: \"define:name,value\")\n"
#| " 24. an option (format: \"file.section.option\")\n"
#| " 25. a local variable in buffer\n"
#| " 26. 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"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /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 ${split:1,,,abc,def,ghi} ==> abc\n"
#| " /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
#| " /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
#| " /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
#| " /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
#| " /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
#| " /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| " /eval -n ${define:len,${calc:5+3}}${len}x${len} ==> 8x8\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@@ -1673,34 +1823,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1733,6 +1885,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
@@ -8061,8 +8215,8 @@ msgid ""
"add [<channel1> [<channel2>...]] || addraw <channel1>[,<channel2>...] "
"[<key1>[,<key2>...]] || del [<channel1> [<channel2>...]] || save || sort"
msgstr ""
"add [<kanal1> [<kanal2>...]] || addraw <kanal1>[,<kanal2>...] "
"[<anahtar1>[,<anahtar2>...]] || del [<kanal1> [<kanal2>...]] || save || sort"
"add [<kanal1> [<kanal2>...]] || addraw <kanal1>[,<kanal2>...] [<anahtar1>[,"
"<anahtar2>...]] || del [<kanal1> [<kanal2>...]] || save || sort"
msgid ""
" add: add current channel or a list of channels (with optional keys) to "
@@ -8090,8 +8244,8 @@ msgstr ""
" add: geçerli kanalı veya bir kanal listesini (isteğe bağlı anahtarlarla) "
"autojoin seçeneğine ekle; kanaldaysanız ve anahtar sağlanmamışsa anahtar "
"kanalda okunur\n"
" addraw: IRC ham biçimini kullan (/join komutuyla aynı); tüm kanallar virgülle"
" ayrılır, isteğe bağlı anahtarlar virgülle ayrılır\n"
" addraw: IRC ham biçimini kullan (/join komutuyla aynı); tüm kanallar "
"virgülle ayrılır, isteğe bağlı anahtarlar virgülle ayrılır\n"
" del: geçerli kanalı veya bir kanal listesini autojoin seçeneğinden sil\n"
" kanal: kanal adı\n"
"anahtar: kanal anahtarı\n"
+26 -22
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2022-03-11 19:30+0100\n"
"POT-Creation-Date: 2022-04-18 12:38+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1373,34 +1373,36 @@ msgid ""
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
"+max,suffix,string\")\n"
" or max chars displayed on screen (format: \"cutscr:max,suffix,string\" "
"or \"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 11. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 13. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 18. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
"xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: \"if:condition?value_if_true:"
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: \"if:condition?value_if_true:"
"value_if_false\")\n"
" 20. result of an expression with parentheses and operators + - * / // % ** "
" 22. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted to "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -1433,6 +1435,8 @@ msgid ""
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+25 -21
View File
@@ -7734,38 +7734,40 @@ command_init ()
" 3. an evaluated sub-string (format: \"eval:xxx\")\n"
" 4. an evaluated condition (format: \"eval_cond:xxx\")\n"
" 5. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
" 6. a string with chars to hide (format: \"hide:char,string\")\n"
" 7. a string with max chars (format: \"cut:max,suffix,string\" "
" 6. a string converted to lower case (format: \"lower:xxx\")\n"
" 7. a string converted to upper case (format: \"upper:xxx\")\n"
" 8. a string with chars to hide (format: \"hide:char,string\")\n"
" 9. a string with max chars (format: \"cut:max,suffix,string\" "
"or \"cut:+max,suffix,string\")\n"
" or max chars displayed on screen "
"(format: \"cutscr:max,suffix,string\" or "
"\"cutscr:+max,suffix,string\")\n"
" 8. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 9. a repeated string (format: \"repeat:count,string\")\n"
" 10. length of a string (format: \"length:xxx\" or "
" 10. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 11. a repeated string (format: \"repeat:count,string\")\n"
" 12. length of a string (format: \"length:xxx\" or "
"\"lengthscr:xxx\")\n"
" 11. split of a string (format: "
" 13. split of a string (format: "
"\"split:number,separators,flags,xxx\")\n"
" 12. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 13. a color (format: \"color:xxx\", see \"Plugin API "
" 14. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 15. a color (format: \"color:xxx\", see \"Plugin API "
"reference\", function \"color\")\n"
" 14. a modifier (format: \"modifier:name,data,string\")\n"
" 15. an info (format: \"info:name,arguments\", arguments are "
" 16. a modifier (format: \"modifier:name,data,string\")\n"
" 17. an info (format: \"info:name,arguments\", arguments are "
"optional)\n"
" 16. a base 16/32/64 encoded/decoded string (format: "
" 18. a base 16/32/64 encoded/decoded string (format: "
"\"base_encode:base,xxx\" or \"base_decode:base,xxx\")\n"
" 17. current date/time (format: \"date\" or \"date:format\")\n"
" 18. an environment variable (format: \"env:XXX\")\n"
" 19. a ternary operator (format: "
" 19. current date/time (format: \"date\" or \"date:format\")\n"
" 20. an environment variable (format: \"env:XXX\")\n"
" 21. a ternary operator (format: "
"\"if:condition?value_if_true:value_if_false\")\n"
" 20. result of an expression with parentheses and operators "
" 22. result of an expression with parentheses and operators "
"+ - * / // % ** (format: \"calc:xxx\")\n"
" 21. a random integer number (format: \"random:min,max\")\n"
" 22. a translated string (format: \"translate:xxx\")\n"
" 23. define a user variable (format: \"define:name,value\")\n"
" 24. an option (format: \"file.section.option\")\n"
" 25. a local variable in buffer\n"
" 26. a hdata name/variable (the value is automatically converted "
" 23. a random integer number (format: \"random:min,max\")\n"
" 24. a translated string (format: \"translate:xxx\")\n"
" 25. define a user variable (format: \"define:name,value\")\n"
" 26. an option (format: \"file.section.option\")\n"
" 27. a local variable in buffer\n"
" 28. 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"
@@ -7798,6 +7800,8 @@ command_init ()
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
" /eval -n ${window.buffer.number} ==> 1\n"
" /eval -n ${\\t} ==> <tab>\n"
" /eval -n ${lower:TEST} ==> test\n"
" /eval -n ${upper:test} ==> TEST\n"
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
" /eval -n ${cut:3,+,test} ==> tes+\n"
" /eval -n ${cut:+3,+,test} ==> te+\n"
+101 -44
View File
@@ -273,6 +273,46 @@ eval_string_eval_cond (const char *text, struct t_eval_context *eval_context)
return strdup ((rc) ? EVAL_STR_TRUE : EVAL_STR_FALSE);
}
/*
* Converts string to lower case.
*
* Note: result must be freed after use.
*/
char *
eval_string_lower (const char *text)
{
char *tmp;
tmp = strdup (text);
if (!tmp)
return strdup ("");
string_tolower (tmp);
return tmp;
}
/*
* Converts string to upper case.
*
* Note: result must be freed after use.
*/
char *
eval_string_upper (const char *text)
{
char *tmp;
tmp = strdup (text);
if (!tmp)
return strdup ("");
string_toupper (tmp);
return tmp;
}
/*
* Hides chars in a string.
*
@@ -1381,37 +1421,40 @@ end:
* 4. a string to evaluate (format: eval:xxx)
* 5. a condition to evaluate (format: eval_cond:xxx)
* 6. a string with escaped chars (format: esc:xxx or \xxx)
* 7. a string with chars to hide (format: hide:char,string)
* 8. a string with max chars (format: cut:max,suffix,string or
* 7. a string converted to lower case (format: lower:xxx)
* 8. a string converted to upper case (format: upper:xxx)
* 9. a string with chars to hide (format: hide:char,string)
* 10. a string with max chars (format: cut:max,suffix,string or
* cut:+max,suffix,string) or max chars on screen
* (format: cutscr:max,suffix,string or cutscr:+max,suffix,string)
* 9. a reversed string (format: rev:xxx) or reversed string for screen,
* 11. a reversed string (format: rev:xxx) or reversed string for screen,
* color codes are not reversed (format: revscr:xxx)
* 10. a repeated string (format: repeat:count,string)
* 11. length of a string (format: length:xxx) or length of a string on screen
* 12. a repeated string (format: repeat:count,string)
* 13. length of a string (format: length:xxx) or length of a string on screen
* (format: lengthscr:xxx); color codes are ignored
* 12. split string (format: split:number,separators,flags,xxx
* 14. split string (format: split:number,separators,flags,xxx
* or split:count,separators,flags,xxx
* or split:random,separators,flags,xxx)
* 13. split shell arguments (format: split:number,xxx or split:count,xxx
* 15. split shell arguments (format: split:number,xxx or split:count,xxx
* or split:random,xxx)
* 14. a regex group captured (format: re:N (0.99) or re:+)
* 15. a color (format: color:xxx)
* 16. a modifier (format: modifier:name,data,xxx)
* 17. an info (format: info:name,arguments)
* 18. a base 16/32/64 encoded/decoded string (format: base_encode:base,xxx
* 16. a regex group captured (format: re:N (0.99) or re:+)
* 17. a color (format: color:xxx)
* 18. a modifier (format: modifier:name,data,xxx)
* 19. an info (format: info:name,arguments)
* 20. 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:xxx)
* 20. an environment variable (format: env:XXX)
* 21. a ternary operator (format: if:condition?value_if_true:value_if_false)
* 22. calculate result of an expression (format: calc:xxx)
* 23. a random integer number in the range from "min" to "max"
* 21. current date/time (format: date or date:xxx)
* 22. an environment variable (format: env:XXX)
* 23. a ternary operator (format: if:condition?value_if_true:value_if_false)
* 24. calculate result of an expression (format: calc:xxx)
* 25. a random integer number in the range from "min" to "max"
* (format: random:min,max)
* 24. a translated string (format: translate:xxx)
* 25. an option (format: file.section.option)
* 26. a buffer local variable
* 27. a pointer name from hashtable "pointers"
* 28. a hdata variable (format: hdata.var1.var2 or hdata[list].var1.var2
* 26. a translated string (format: translate:xxx)
* 27. define a new variable (format: define:name,value)
* 28. an option (format: file.section.option)
* 29. a buffer local variable
* 30. a pointer name from hashtable "pointers"
* 31. a hdata variable (format: hdata.var1.var2 or hdata[list].var1.var2
* or hdata[ptr].var1.var2 or hdata[ptr_name].var1.var2)
*
* See /help in WeeChat for examples.
@@ -1529,7 +1572,21 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 7. hide chars: replace all chars by a given char/string */
/* 7. convert to lower case */
if (strncmp (text, "lower:", 6) == 0)
{
value = eval_string_lower (text + 6);
goto end;
}
/* 8. convert to upper case */
if (strncmp (text, "upper:", 6) == 0)
{
value = eval_string_upper (text + 6);
goto end;
}
/* 9. hide chars: replace all chars by a given char/string */
if (strncmp (text, "hide:", 5) == 0)
{
value = eval_string_hide (text + 5);
@@ -1537,7 +1594,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 8. cut chars:
* 10. cut chars:
* cut: max number of chars, and add an optional suffix when the
* string is cut
* cutscr: max number of chars displayed on screen, and add an optional
@@ -1554,7 +1611,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 9. reverse string */
/* 11. reverse string */
if (strncmp (text, "rev:", 4) == 0)
{
value = string_reverse (text + 4);
@@ -1566,7 +1623,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 10. repeated string */
/* 12. repeated string */
if (strncmp (text, "repeat:", 7) == 0)
{
value = eval_string_repeat (text + 7);
@@ -1574,7 +1631,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 11. length of string:
* 13. length of string:
* length: number of chars
* lengthscr: number of chars displayed on screen
*/
@@ -1593,49 +1650,49 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 12: split string */
/* 14: split string */
if (strncmp (text, "split:", 6) == 0)
{
value = eval_string_split (text + 6);
goto end;
}
/* 13: split shell */
/* 15: split shell */
if (strncmp (text, "split_shell:", 12) == 0)
{
value = eval_string_split_shell (text + 12);
goto end;
}
/* 14. regex group captured */
/* 16. regex group captured */
if (strncmp (text, "re:", 3) == 0)
{
value = eval_string_regex_group (text + 3, eval_context);
goto end;
}
/* 15. color code */
/* 17. color code */
if (strncmp (text, "color:", 6) == 0)
{
value = eval_string_color (text + 6);
goto end;
}
/* 16. modifier */
/* 18. modifier */
if (strncmp (text, "modifier:", 9) == 0)
{
value = eval_string_modifier (text + 9);
goto end;
}
/* 17. info */
/* 19. info */
if (strncmp (text, "info:", 5) == 0)
{
value = eval_string_info (text + 5);
goto end;
}
/* 18. base_encode/base_decode */
/* 20. base_encode/base_decode */
if (strncmp (text, "base_encode:", 12) == 0)
{
value = eval_string_base_encode (text + 12);
@@ -1647,14 +1704,14 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 19. current date/time */
/* 21. current date/time */
if ((strncmp (text, "date", 4) == 0) && (!text[4] || (text[4] == ':')))
{
value = eval_string_date (text + 4);
goto end;
}
/* 20. environment variable */
/* 22. environment variable */
if (strncmp (text, "env:", 4) == 0)
{
ptr_value = getenv (text + 4);
@@ -1662,7 +1719,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 21: ternary operator: if:condition?value_if_true:value_if_false */
/* 23: ternary operator: if:condition?value_if_true:value_if_false */
if (strncmp (text, "if:", 3) == 0)
{
value = eval_string_if (text + 3, eval_context);
@@ -1670,7 +1727,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 22. calculate the result of an expression
* 24. calculate the result of an expression
* (with number, operators and parentheses)
*/
if (strncmp (text, "calc:", 5) == 0)
@@ -1680,7 +1737,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 23. random number
* 25. random number
*/
if (strncmp (text, "random:", 7) == 0)
{
@@ -1689,7 +1746,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 24. translated text
* 26. translated text
*/
if (strncmp (text, "translate:", 10) == 0)
{
@@ -1697,7 +1754,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 25. define a variable */
/* 27. define a variable */
if (strncmp (text, "define:", 7) == 0)
{
eval_string_define (text + 7, eval_context);
@@ -1705,7 +1762,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 25. option: if found, return this value */
/* 28. option: if found, return this value */
if (strncmp (text, "sec.data.", 9) == 0)
{
ptr_value = hashtable_get (secure_hashtable_data, text + 9);
@@ -1748,7 +1805,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
}
/* 26. local variable in buffer */
/* 29. local variable in buffer */
ptr_buffer = hashtable_get (eval_context->pointers, "buffer");
if (ptr_buffer)
{
@@ -1760,7 +1817,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
}
/* 27. hdata */
/* 30. hdata */
value = eval_string_hdata (text, eval_context);
end:
+10
View File
@@ -516,6 +516,16 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("\t", "${\\t}");
WEE_CHECK_EVAL("\t", "${esc:\t}");
/* test case conversion: to lower case */
WEE_CHECK_EVAL("", "${lower:}");
WEE_CHECK_EVAL("this is a test", "${lower:This is a TEST}");
WEE_CHECK_EVAL("testÉ testé", "${lower:TESTÉ Testé}");
/* test case conversion: to upper case */
WEE_CHECK_EVAL("", "${upper:}");
WEE_CHECK_EVAL("THIS IS A TEST", "${upper:This is a TEST}");
WEE_CHECK_EVAL("TESTÉ TESTé", "${upper:TESTÉ Testé}");
/* test hidden chars */
WEE_CHECK_EVAL("", "${hide:invalid}");
WEE_CHECK_EVAL("********", "${hide:*,password}");