core: add debug option "-d" in command /eval (issue #1434)

v2.8-utf8proc
Sébastien Helleu 2019-12-18 21:18:59 +01:00
parent 7e833ee60b
commit a13099aa63
23 changed files with 334 additions and 183 deletions

View File

@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features:: New features::
* core: add debug option "-d" in command /eval (issue #1434)
* api: add info "weechat_headless" (issue #1433) * api: add info "weechat_headless" (issue #1433)
Bug fixes:: Bug fixes::

View File

@ -263,71 +263,72 @@ infolists: zeigt Information über die Infolists an
* `+eval+`: evaluierter Ausdruck * `+eval+`: evaluierter Ausdruck
---- ----
/eval [-n|-s] <expression> /eval [-n|-s] [-d] <expression>
[-n] -c <expression1> <operator> <expression2> [-n] [-d] -c <expression1> <operator> <expression2>
-n: gibt das Ergebnis aus, ohne dass dieses in den Buffer gesendet wird (debug Modus) -n: display result without sending it to buffer (debug mode)
-s: teilt Ausdrücke, bevor sie evaluiert werden (mehrere Befehle können durch Semikolon getrennt werden) -s: split expression before evaluating it (many commands can be separated by semicolons)
-c: Auswertung als Bedingung: nutzt Operatoren und runde Klammern, Rückgabewert als Boolean-Wert ("0" oder "1") -d: display debug output after evaluation
expression: Ausdruck welcher verarbeitet werden soll. Variablen im Format ${variable} werden ersetzt (siehe unten); mehrere Befehle werden durch ein Semikolon voneinander getrennt -c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
operator: ein logischer oder vergleichender Operand: expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
- logische Operanden: operator: a logical or comparison operator:
&& boolean "und" - logical operators:
|| boolean "oder" && boolean "and"
- vergleichende Operanden: || boolean "or"
== gleich - comparison operators:
!= ungleich == equal
<= kleiner oder gleich != not equal
< kleiner <= less or equal
>= größer oder gleich < less
> größer >= greater or equal
=~ stimmt mit regulärem POSIX Ausdruck überein > greater
!~ stimmt NICHT mit regulärem POSIX Ausdruck überein =~ is matching POSIX extended regex
=* stimmt mit Maske überein (Platzhalter "*" ist erlaubt) !~ is NOT matching POSIX extended regex
!* stimmt mit Maske NICHT überein (Platzhalter "*" ist erlaubt) =* is matching mask (wildcard "*" is allowed)
!* is NOT matching mask (wildcard "*" is allowed)
Ein Ausdruck gilt als "wahr" sofern das Ergebnis weder NULL, nicht leer und von "0" abweichend ist. An expression is considered as "true" if it is not NULL, not empty, and different from "0".
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: The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- Integer (Beispiele: 5, -7) - integer (examples: 5, -7)
- Fließkommazahl (Beispiele: 5.2, -7.5, 2.83e-2) - floating point number (examples: 5.2, -7.5, 2.83e-2)
- hexadezimale Zahl (Beispiele: 0xA3, -0xA3) - hexadecimal number (examples: 0xA3, -0xA3)
Um einen Vergleich zwischen zwei Zeichenketten zu erzwingen, müssen die Ausdrücke in Anführungszeichen gesetzt werden, zum Beispiel: To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0 50 > 100 ==> 0
"50" > "100" ==> 1 "50" > "100" ==> 1
Einige Variablen werden im Ausdruck mittels der Formatierung ${variable} ersetzt. Mögliche Variablen sind, nach Reihenfolge ihrer Priorität: Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. eine evaluierte Teilzeichenkette (Format: "eval:xxx") 1. an evaluated sub-string (format: "eval:xxx")
2. eine Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx") 2. a string with escaped chars (format: "esc:xxx" or "\xxx")
3. Zeichen, die in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette") 3. a string with chars to hide (format: "hide:char,string")
4. eine Zeichenkette mit einer maximalen Anzahl an Zeichen (Format: "cut:+Max,Suffix,Zeichenkette") 4. a string with max chars (format: "cut:max,suffix,string" or "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") or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. eine Zeichenkette umkehren (Format: "rev:xxx" oder "revscr:xxx") 5. a reversed string (format: "rev:xxx" or "revscr:xxx")
6. eine Zeichenkette wiederholen (Format: "repeat:Anzahl,Zeichenkette") 6. a repeated string (format: "repeat:count,string")
7. Länge einer Zeichenkette (Format: "length:xxx" oder "lengthscr:xxx") 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
8. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color") 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
9. ein Modifizierer (Format: "info:Name,Argumente", Argumente sind optional) 9. a modifier (format: "modifier:name,data,string")
10. eine Info (Format: "Info:Name,Argumente", Argumente sind optional) 10. an info (format: "info:name,arguments", arguments are optional)
11. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format") 11. current date/time (format: "date" or "date:format")
12. eine Umgebungsvariable (Format: "env:XXX") 12. an environment variable (format: "env:XXX")
13. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr") 13. a ternary operator (format: "if:condition?value_if_true:value_if_false")
14. Ergebnis eines Ausdrucks mit Klammern und Operatoren + - * / // % ** (Format: "calc:xxx") 14. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
15. eine Option (Format: "file.section.option") 15. an option (format: "file.section.option")
16. eine lokale Variable eines Buffers 16. a local variable in buffer
17. 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. 17. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Das Format für hdata kann wie folgt aufgebaut sein: Format for hdata can be one of following:
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.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...: startet hdata mittels einer Liste, zum Beispiel: hdata[list].var1.var2...: start with a hdata using a list, for example:
${buffer[gui_buffers].full_name}: der vollständige Name des ersten Buffers, in der verknüpften Liste aller Buffer ${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: Name der ersten Erweiterung, in der verknüpften Liste aller Erweiterungen ${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[pointer].var1.var2...: startet hdata mittels einem Pointer, zum Beispiel: hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: vollständiger Name eines Buffers und des dazugehörigen Pointers (kann in triggern benutzt werden) ${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
Die vorhandenen Namen für hdata und Variablen sind in der "Anleitung für API Erweiterung", Bereich "weechat_hdata_get". beschrieben For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Beispiele (einfache Zeichenketten): Examples (simple strings):
/eval -n ${info:version} ==> 0.4.3 /eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user /eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3 /eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.freenode_password} ==> geheim /eval -n ${sec.data.freenode_password} ==> secret
/eval -n ${window} ==> 0x2549aa0 /eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320 /eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat /eval -n ${window.buffer.full_name} ==> core.weechat
@ -343,16 +344,16 @@ Beispiele (einfache Zeichenketten):
/eval -n ${length:test} ==> 4 /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21 /eval -n ${calc:(5+2)*3} ==> 21
Beispiele (Bedingungen): Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0 /eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1 /eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1 /eval -n -c (8 > 12) || (5 > 2) ==> 1
/eval -n -c (8 > 12) && (5 > 2) ==> 0 /eval -n -c (8 > 12) && (5 > 2) ==> 0
/eval -n -c abcd =~ ^ABC ==> 1 /eval -n -c abcd =~ ^ABC ==> 1
/eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^ABC ==> 0
/eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd =~ (?-i)^abc ==> 1
/eval -n -c abcd !~ abc ==> 0 /eval -n -c abcd !~ abc ==> 0
/eval -n -c abcd =* a*d ==> 1 /eval -n -c abcd =* a*d ==> 1
---- ----
[[command_weechat_filter]] [[command_weechat_filter]]

View File

@ -263,11 +263,12 @@ infolists: display infos about infolists
* `+eval+`: evaluate expression * `+eval+`: evaluate expression
---- ----
/eval [-n|-s] <expression> /eval [-n|-s] [-d] <expression>
[-n] -c <expression1> <operator> <expression2> [-n] [-d] -c <expression1> <operator> <expression2>
-n: display result without sending it to buffer (debug mode) -n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons) -s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1") -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 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: operator: a logical or comparison operator:

View File

@ -263,11 +263,12 @@ infolists : afficher des infos sur les infolists
* `+eval+`: évaluer une expression * `+eval+`: évaluer une expression
---- ----
/eval [-n|-s] <expression> /eval [-n|-s] [-d] <expression>
[-n] -c <expression1> <opérateur> <expression2> [-n] [-d] -c <expression1> <opérateur> <expression2>
-n : afficher le résultat sans envoyer au tampon (mode debug) -n : afficher le résultat sans envoyer au tampon (mode debug)
-s : découper l'expression avant de l'évaluer (plusieurs commandes peuvent être séparées par des points-virgules) -s : découper l'expression avant de l'évaluer (plusieurs commandes peuvent être séparées par des points-virgules)
-d : afficher la sortie de debug après l'évaluation
-c : évaluer comme une condition : utiliser les opérateurs et les parenthèses, retourner une valeur booléenne ("0" ou "1") -c : évaluer comme une condition : utiliser les opérateurs et les parenthèses, retourner une valeur booléenne ("0" ou "1")
expression : expression à évaluer, les variables avec le format ${variable} sont remplacées (voir ci-dessous) ; plusieurs commandes peuvent être séparées par des points-virgules expression : expression à évaluer, les variables avec le format ${variable} sont remplacées (voir ci-dessous) ; plusieurs commandes peuvent être séparées par des points-virgules
opérateur : un opérateur logique ou de comparaison : opérateur : un opérateur logique ou de comparaison :

View File

@ -263,11 +263,12 @@ infolists: display infos about infolists
* `+eval+`: evaluate expression * `+eval+`: evaluate expression
---- ----
/eval [-n|-s] <expression> /eval [-n|-s] [-d] <expression>
[-n] -c <expression1> <operator> <expression2> [-n] [-d] -c <expression1> <operator> <expression2>
-n: display result without sending it to buffer (debug mode) -n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons) -s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1") -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 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: operator: a logical or comparison operator:

View File

@ -263,11 +263,12 @@ infolists: インフォリストに関する情報を表示
* `+eval+`: 式を評価 * `+eval+`: 式を評価
---- ----
/eval [-n|-s] <expression> /eval [-n|-s] [-d] <expression>
[-n] -c <expression1> <operator> <expression2> [-n] [-d] -c <expression1> <operator> <expression2>
-n: display result without sending it to buffer (debug mode) -n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons) -s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1") -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 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: operator: a logical or comparison operator:

View File

@ -263,71 +263,72 @@ infolists: wyświetla informacje o infolistach
* `+eval+`: przetwórz wyrażenie * `+eval+`: przetwórz wyrażenie
---- ----
/eval [-n|-s] <wyrażenie> /eval [-n|-s] [-d] <expression>
[-n] -c <wyrażenie1> <operator> <wyrażenie2> [-n] [-d] -c <expression1> <operator> <expression2>
-n: wyświetla wynik bez wysyłania go do buforu (tryb debugowania) -n: display result without sending it to buffer (debug mode)
-s: podziel wyrażenie przed przetworzeniem go (wiele komend może być oddzielonych średnikami) -s: split expression before evaluating it (many commands can be separated by semicolons)
-c: przetwarza jako warunek: użyj operatorów i nawiasów, zwraca wartość logiczną ("0" lub "1") -d: display debug output after evaluation
wyrażenie: wyrażenie do przetworzenia, zmienne o formacie ${zmienna} są zastępowane (zobacz niżej); wiele komend można oddzielić średnikami -c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
operator: operator logiczny lub porównania: expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
- operatory logiczne: operator: a logical or comparison operator:
&& logiczne "i" - logical operators:
|| logiczne "lub" && boolean "and"
- operatory porównania: || boolean "or"
== równy - comparison operators:
!= różny == equal
<= mniejszy lub równy != not equal
< mniejszy <= less or equal
>= większy lub równy < less
> większy >= greater or equal
=~ pasuje do rozszerzonego wyrażenia regularnego POSIX > greater
!~ NIE pasuje do rozszerzonego wyrażenia regularnego POSIX =~ is matching POSIX extended regex
=* pasuje do maski (dzika karta "*" dozwolona) !~ is NOT matching POSIX extended regex
!* NIE pasuje do maski (dzika karta "*" dozwolona) =* is matching mask (wildcard "*" is allowed)
!* is NOT matching mask (wildcard "*" is allowed)
Wyrażenie jest uznawane za „prawdziwe” jeśli nie jest NULL, nie jest puste, oraz różni się od "0". An expression is considered as "true" if it is not NULL, not empty, and different from "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: The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- liczby całkowite (przykłady: 5, -7) - integer (examples: 5, -7)
- liczby zmiennoprzecinkowe (przykłady: 5.2, -7.5, 2.83e-2) - floating point number (examples: 5.2, -7.5, 2.83e-2)
- liczby szesnastkowe (przykłady: 0xA3, -0xA3) - hexadecimal number (examples: 0xA3, -0xA3)
W celu wymuszenia porównywania ciągów, należy umieścić każde wyrażenie w cudzysłowie, na przykład: To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0 50 > 100 ==> 0
"50" > "100" ==> 1 "50" > "100" ==> 1
Niektóre zmienne w wyrażeniach są zamieniane, poprzez zastosowanie formatu ${zmienna}, według priorytetu zmienną może być: Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. przetworzony ciąg (format: "eval:xxx") 1. an evaluated sub-string (format: "eval:xxx")
2. ciąg z wyescapowanymi znakami (format: "esc:xxx" lub "\xxx") 2. a string with escaped chars (format: "esc:xxx" or "\xxx")
3. ciąg ze znakami do ukrycia (format: "hide:char,string") 3. a string with chars to hide (format: "hide:char,string")
4. ciąg o maksymalnej długości (format: "cut:max,suffix,string" lub "cut:+max,suffix,string") 4. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
lub maksymalna ilość znaków wyświetlanych na ekranie (format: "cutscr:max,suffix,string" lub "cutscr:+max,suffix,string") or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. odwrócony ciąg (format: "rev:xxx") 5. a reversed string (format: "rev:xxx" or "revscr:xxx")
6. powtórzony ciąg (format: "repeat:ilość,ciąg") 6. a repeated string (format: "repeat:count,string")
7. długość ciągu (format: "length:xxx" or "lengthscr:xxx") 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
8. kolor (format "color:xxx", zobacz „Opis API wtyczek”, funkcja "color") 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
9. modyfikator (format: "modifier:name,data,string") 9. a modifier (format: "modifier:name,data,string")
10. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne) 10. an info (format: "info:name,arguments", arguments are optional)
11. obecna data/czas (format: "date" lub "date:format") 11. current date/time (format: "date" or "date:format")
12. zmienna środowiskowa (format: "env:XXX") 12. an environment variable (format: "env:XXX")
13. wyrażenie warunkowe (format: "if:condition?value_if_true:value_if_false") 13. a ternary operator (format: "if:condition?value_if_true:value_if_false")
14. wynik wyrażenia z nawiasami i operatorami + - * / // % ** (format: "calc:xxx") 14. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
15. opcja (format: plik.sekcja.opcja) 15. an option (format: "file.section.option")
16 zmienna lokalna w buforze 16. a local variable in buffer
17. nazwa hdatay/zmiennej (wartość jest automatycznie konwertowana na ciąg znaków), domyślnie "window" i "buffer" wskazują na aktualne okno/bufor. 17. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format dla hdata może być jednym z poniższych: Format for hdata can be one of following:
hdata.zmienna1.zmienna2...: inicjuje hdata (wskaźnik musi być znany), następnie wypytuje zmienne jedna po drugiej (inne hdata mogą być następne) hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].zmienna1.zmienna2...: inicjuje hdata z wykorzystaniem listy, na przykład: hdata[list].var1.var2...: start with a hdata using a list, for example:
${buffer[gui_buffers].full_name}: pełna nazwa buforu w połączonej liście buforów ${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: nazwa pierwszej wtyczki w połączonej liście wtyczek ${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[wskaźnik].zmienna1.zmienna2...: zacznij z hdata używając wskaźnika, na przykład: hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: pełna nazwa buforu z tym wskaźnikiem (może zostać użyte w triggerach) ${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
Nazwy hdata i zmiennych, można znaleźć w „Opisie API wtyczek”, funkcja "weechat_hdata_get". For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Przykłady (proste ciągi): Examples (simple strings):
/eval -n ${info:version} ==> 0.4.3 /eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user /eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3 /eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.freenode_password} ==> secret /eval -n ${sec.data.freenode_password} ==> secret
/eval -n ${window} ==> 0x2549aa0 /eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320 /eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat /eval -n ${window.buffer.full_name} ==> core.weechat
@ -343,7 +344,7 @@ Przykłady (proste ciągi):
/eval -n ${length:test} ==> 4 /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21 /eval -n ${calc:(5+2)*3} ==> 21
Przykłady (warunki): Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0 /eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1 /eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1 /eval -n -c (8 > 12) || (5 > 2) ==> 1

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1522,13 +1522,17 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "vyhodnotit výraz" msgstr "vyhodnotit výraz"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <výraz> || [-n] -c <výraz1> <operátor> <výraz2>" msgstr "[-n|-s] <výraz> || [-n] -c <výraz1> <operátor> <výraz2>"
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -24,7 +24,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-12-15 21:16+0100\n" "PO-Revision-Date: 2019-12-15 21:16+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n" "Language-Team: German <kde-i18n-de@kde.org>\n"
@ -1658,13 +1658,18 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "evaluierter Ausdruck" msgstr "evaluierter Ausdruck"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
#, fuzzy
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1553,13 +1553,16 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "" msgstr ""
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-12-13 21:33+0100\n" "PO-Revision-Date: 2019-12-18 21:18+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n" "Language: fr\n"
@ -1629,14 +1629,18 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "évaluer une expression" msgstr "évaluer une expression"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
"[-n|-s] <expression> || [-n] -c <expression1> <opérateur> <expression2>" "[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <opérateur> "
"<expression2>"
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "
@ -1745,6 +1749,7 @@ msgstr ""
" -n : afficher le résultat sans envoyer au tampon (mode debug)\n" " -n : afficher le résultat sans envoyer au tampon (mode debug)\n"
" -s : découper l'expression avant de l'évaluer (plusieurs commandes " " -s : découper l'expression avant de l'évaluer (plusieurs commandes "
"peuvent être séparées par des points-virgules)\n" "peuvent être séparées par des points-virgules)\n"
" -d : afficher la sortie de debug après l'évaluation\n"
" -c : évaluer comme une condition : utiliser les opérateurs et les " " -c : évaluer comme une condition : utiliser les opérateurs et les "
"parenthèses, retourner une valeur booléenne (\"0\" ou \"1\")\n" "parenthèses, retourner une valeur booléenne (\"0\" ou \"1\")\n"
"expression : expression à évaluer, les variables avec le format ${variable} " "expression : expression à évaluer, les variables avec le format ${variable} "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1441,13 +1441,16 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "" msgstr ""
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1534,7 +1534,9 @@ msgid "evaluate expression"
msgstr "" msgstr ""
#, fuzzy #, fuzzy
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
"[-n] <espressione> || [-n] -c <espressione1> <operatore> <espressione2>" "[-n] <espressione> || [-n] -c <espressione1> <operatore> <espressione2>"
@ -1543,6 +1545,7 @@ msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -1589,7 +1589,10 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "式を評価" msgstr "式を評価"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
#, fuzzy #, fuzzy
@ -1597,6 +1600,7 @@ msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-12-01 16:23+0100\n" "PO-Revision-Date: 2019-12-01 16:23+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@ -1624,13 +1624,18 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "przetwórz wyrażenie" msgstr "przetwórz wyrażenie"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <wyrażenie> || [-n] -c <wyrażenie1> <operator> <wyrażenie2>" msgstr "[-n|-s] <wyrażenie> || [-n] -c <wyrażenie1> <operator> <wyrażenie2>"
#, fuzzy
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
@ -1593,7 +1593,10 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "avaliar uma expressão" msgstr "avaliar uma expressão"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <expressão> || [-n] -c <expressão1> <operador> <expressão2>" msgstr "[-n|-s] <expressão> || [-n] -c <expressão1> <operador> <expressão2>"
#, fuzzy #, fuzzy
@ -1601,6 +1604,7 @@ msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1598,13 +1598,17 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "avaliar expressão" msgstr "avaliar expressão"
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" #, fuzzy
msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1463,13 +1463,16 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "" msgstr ""
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1294,13 +1294,16 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "" msgstr ""
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-12-13 21:32+0100\n" "POT-Creation-Date: 2019-12-18 21:17+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1296,13 +1296,16 @@ msgstr ""
msgid "evaluate expression" msgid "evaluate expression"
msgstr "" msgstr ""
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>" msgid ""
"[-n|-s] [-d] <expression> || [-n] [-d] -c <expression1> <operator> "
"<expression2>"
msgstr "" msgstr ""
msgid "" msgid ""
" -n: display result without sending it to buffer (debug mode)\n" " -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be " " -s: split expression before evaluating it (many commands can be "
"separated by semicolons)\n" "separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, return a " " -c: evaluate as condition: use operators and parentheses, return a "
"boolean value (\"0\" or \"1\")\n" "boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format ${variable} are " "expression: expression to evaluate, variables with format ${variable} are "

View File

@ -1936,8 +1936,9 @@ COMMAND_CALLBACK(debug)
COMMAND_CALLBACK(eval) COMMAND_CALLBACK(eval)
{ {
int i, print_only, split_command, condition, error; int i, print_only, split_command, condition, debug, error;
char *result, *ptr_args, *expr, **commands; char *result, *ptr_args, *expr, **commands;
const char **debug_output;
struct t_hashtable *pointers, *options; struct t_hashtable *pointers, *options;
/* make C compiler happy */ /* make C compiler happy */
@ -1948,6 +1949,7 @@ COMMAND_CALLBACK(eval)
print_only = 0; print_only = 0;
split_command = 0; split_command = 0;
condition = 0; condition = 0;
debug = 0;
error = 0; error = 0;
COMMAND_MIN_ARGS(2, ""); COMMAND_MIN_ARGS(2, "");
@ -1970,6 +1972,11 @@ COMMAND_CALLBACK(eval)
condition = 1; condition = 1;
ptr_args = argv_eol[i + 1]; ptr_args = argv_eol[i + 1];
} }
else if (string_strcasecmp (argv[i], "-d") == 0)
{
debug = 1;
ptr_args = argv_eol[i + 1];
}
else else
{ {
ptr_args = argv_eol[i]; ptr_args = argv_eol[i];
@ -1992,7 +1999,7 @@ COMMAND_CALLBACK(eval)
} }
options = NULL; options = NULL;
if (condition) if (condition || debug)
{ {
options = hashtable_new (32, options = hashtable_new (32,
WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING,
@ -2000,7 +2007,12 @@ COMMAND_CALLBACK(eval)
NULL, NULL,
NULL); NULL);
if (options) if (options)
hashtable_set (options, "type", "condition"); {
if (condition)
hashtable_set (options, "type", "condition");
if (debug)
hashtable_set (options, "debug", "1");
}
} }
if (print_only) if (print_only)
@ -2028,6 +2040,13 @@ COMMAND_CALLBACK(eval)
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS)); GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS));
} }
free (expr); free (expr);
if (options && debug)
{
debug_output = hashtable_get (options,
"debug_output");
if (debug_output)
gui_chat_printf (NULL, "%s", debug_output);
}
} }
} }
else else
@ -2050,6 +2069,13 @@ COMMAND_CALLBACK(eval)
{ {
error = 1; error = 1;
} }
if (options && debug)
{
debug_output = hashtable_get (options,
"debug_output");
if (debug_output)
gui_chat_printf (NULL, "%s", debug_output);
}
} }
string_free_split_command (commands); string_free_split_command (commands);
} }
@ -2066,6 +2092,13 @@ COMMAND_CALLBACK(eval)
{ {
error = 1; error = 1;
} }
if (options && debug)
{
debug_output = hashtable_get (options,
"debug_output");
if (debug_output)
gui_chat_printf (NULL, "%s", debug_output);
}
} }
} }
@ -7304,12 +7337,13 @@ command_init ()
hook_command ( hook_command (
NULL, "eval", NULL, "eval",
N_("evaluate expression"), N_("evaluate expression"),
N_("[-n|-s] <expression>" N_("[-n|-s] [-d] <expression>"
" || [-n] -c <expression1> <operator> <expression2>"), " || [-n] [-d] -c <expression1> <operator> <expression2>"),
N_(" -n: display result without sending it to buffer " N_(" -n: display result without sending it to buffer "
"(debug mode)\n" "(debug mode)\n"
" -s: split expression before evaluating it " " -s: split expression before evaluating it "
"(many commands can be separated by semicolons)\n" "(many commands can be separated by semicolons)\n"
" -d: display debug output after evaluation\n"
" -c: evaluate as condition: use operators and parentheses, " " -c: evaluate as condition: use operators and parentheses, "
"return a boolean value (\"0\" or \"1\")\n" "return a boolean value (\"0\" or \"1\")\n"
"expression: expression to evaluate, variables with format " "expression: expression to evaluate, variables with format "

View File

@ -25,6 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdarg.h>
#include <regex.h> #include <regex.h>
#include <time.h> #include <time.h>
@ -45,6 +46,10 @@
#include "../plugins/plugin.h" #include "../plugins/plugin.h"
#define EVAL_DEBUG(msg, argz...) \
if (eval_context->debug) \
eval_debug_message (eval_context, msg, ##argz);
char *logical_ops[EVAL_NUM_LOGICAL_OPS] = char *logical_ops[EVAL_NUM_LOGICAL_OPS] =
{ "||", "&&" }; { "||", "&&" };
@ -58,6 +63,24 @@ char *eval_expression_condition (const char *expr,
struct t_eval_context *eval_context); struct t_eval_context *eval_context);
/*
* Adds a debug message in the debug output.
*/
void
eval_debug_message (struct t_eval_context *eval_context, char *message, ...)
{
weechat_va_format (message);
if (!vbuffer)
return;
if (*(eval_context->debug)[0])
string_dyn_concat (eval_context->debug, "\n");
string_dyn_concat (eval_context->debug, vbuffer);
free (vbuffer);
}
/* /*
* Checks if a value is true: a value is true if string is non-NULL, non-empty * Checks if a value is true: a value is true if string is non-NULL, non-empty
* and different from "0". * and different from "0".
@ -140,13 +163,17 @@ eval_strstr_level (const char *string, const char *search,
*/ */
char * char *
eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path) eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
struct t_eval_context *eval_context)
{ {
char *value, *old_value, *var_name, str_value[128], *pos; char *value, *old_value, *var_name, str_value[128], *pos;
const char *ptr_value, *hdata_name, *ptr_var_name; const char *ptr_value, *hdata_name, *ptr_var_name;
int type; int type;
struct t_hashtable *hashtable; struct t_hashtable *hashtable;
EVAL_DEBUG("eval_hdata_get_value(\"%s\", 0x%lx, \"%s\")",
hdata->name, pointer, path);
value = NULL; value = NULL;
var_name = NULL; var_name = NULL;
@ -274,7 +301,10 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path)
hdata = hook_hdata_get (NULL, hdata_name); hdata = hook_hdata_get (NULL, hdata_name);
old_value = value; old_value = value;
value = eval_hdata_get_value (hdata, pointer, (pos) ? pos + 1 : NULL); value = eval_hdata_get_value (hdata,
pointer,
(pos) ? pos + 1 : NULL,
eval_context);
if (old_value) if (old_value)
free (old_value); free (old_value);
} }
@ -339,6 +369,8 @@ eval_replace_vars_cb (void *data, const char *text)
eval_context = (struct t_eval_context *)data; eval_context = (struct t_eval_context *)data;
EVAL_DEBUG("eval_replace_vars_cb(\"%s\")", text);
/* 1. variable in hashtable "extra_vars" */ /* 1. variable in hashtable "extra_vars" */
if (eval_context->extra_vars) if (eval_context->extra_vars)
{ {
@ -785,7 +817,10 @@ eval_replace_vars_cb (void *data, const char *text)
goto end; goto end;
} }
value = eval_hdata_get_value (hdata, pointer, (pos) ? pos + 1 : NULL); value = eval_hdata_get_value (hdata,
pointer,
(pos) ? pos + 1 : NULL,
eval_context);
end: end:
if (hdata_name) if (hdata_name)
@ -808,6 +843,8 @@ eval_replace_vars (const char *expr, struct t_eval_context *eval_context)
const char *no_replace_prefix_list[] = { "if:", NULL }; const char *no_replace_prefix_list[] = { "if:", NULL };
char *result; char *result;
EVAL_DEBUG("eval_replace_vars(\"%s\")", expr);
eval_context->recursion_count++; eval_context->recursion_count++;
if (eval_context->recursion_count < EVAL_RECURSION_MAX) if (eval_context->recursion_count < EVAL_RECURSION_MAX)
@ -845,13 +882,17 @@ eval_replace_vars (const char *expr, struct t_eval_context *eval_context)
*/ */
char * char *
eval_compare (const char *expr1, int comparison, const char *expr2) eval_compare (const char *expr1, int comparison, const char *expr2,
struct t_eval_context *eval_context)
{ {
int rc, string_compare, length1, length2; int rc, string_compare, length1, length2;
regex_t regex; regex_t regex;
double value1, value2; double value1, value2;
char *error; char *error;
EVAL_DEBUG("eval_compare(\"%s\", \"%s\", \"%s\")",
expr1, comparisons[comparison], expr2);
rc = 0; rc = 0;
string_compare = 0; string_compare = 0;
@ -958,6 +999,8 @@ eval_expression_condition (const char *expr,
const char *pos, *pos_end; const char *pos, *pos_end;
char *expr2, *sub_expr, *value, *tmp_value, *tmp_value2; char *expr2, *sub_expr, *value, *tmp_value, *tmp_value2;
EVAL_DEBUG("eval_expression_condition(\"%s\")", expr);
value = NULL; value = NULL;
if (!expr) if (!expr)
@ -1080,7 +1123,7 @@ eval_expression_condition (const char *expr,
tmp_value2 = eval_expression_condition (pos, eval_context); tmp_value2 = eval_expression_condition (pos, eval_context);
} }
free (sub_expr); free (sub_expr);
value = eval_compare (tmp_value, comp, tmp_value2); value = eval_compare (tmp_value, comp, tmp_value2, eval_context);
if (tmp_value) if (tmp_value)
free (tmp_value); free (tmp_value);
if (tmp_value2) if (tmp_value2)
@ -1192,6 +1235,9 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace,
int empty_replace_allowed; int empty_replace_allowed;
struct t_eval_regex eval_regex; struct t_eval_regex eval_regex;
EVAL_DEBUG("eval_replace_regex(\"%s\", 0x%lx, \"%s\")",
string, regex, replace);
if (!string || !regex || !replace) if (!string || !regex || !replace)
return NULL; return NULL;
@ -1334,7 +1380,7 @@ char *
eval_expression (const char *expr, struct t_hashtable *pointers, eval_expression (const char *expr, struct t_hashtable *pointers,
struct t_hashtable *extra_vars, struct t_hashtable *options) struct t_hashtable *extra_vars, struct t_hashtable *options)
{ {
struct t_eval_context eval_context; struct t_eval_context context, *eval_context;
int condition, rc, pointers_allocated, regex_allocated; int condition, rc, pointers_allocated, regex_allocated;
int ptr_window_added, ptr_buffer_added; int ptr_window_added, ptr_buffer_added;
char *value; char *value;
@ -1372,13 +1418,16 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
pointers_allocated = 1; pointers_allocated = 1;
} }
eval_context.pointers = pointers; eval_context = &context;
eval_context.extra_vars = extra_vars;
eval_context.extra_vars_eval = 0; eval_context->pointers = pointers;
eval_context.prefix = default_prefix; eval_context->extra_vars = extra_vars;
eval_context.suffix = default_suffix; eval_context->extra_vars_eval = 0;
eval_context.regex = NULL; eval_context->prefix = default_prefix;
eval_context.recursion_count = 0; eval_context->suffix = default_suffix;
eval_context->regex = NULL;
eval_context->recursion_count = 0;
eval_context->debug = NULL;
/* /*
* set window/buffer with pointer to current window/buffer * set window/buffer with pointer to current window/buffer
@ -1413,17 +1462,17 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
/* check if extra vars must be evaluated */ /* check if extra vars must be evaluated */
ptr_value = hashtable_get (options, "extra"); ptr_value = hashtable_get (options, "extra");
if (ptr_value && (strcmp (ptr_value, "eval") == 0)) if (ptr_value && (strcmp (ptr_value, "eval") == 0))
eval_context.extra_vars_eval = 1; eval_context->extra_vars_eval = 1;
/* check for custom prefix */ /* check for custom prefix */
ptr_value = hashtable_get (options, "prefix"); ptr_value = hashtable_get (options, "prefix");
if (ptr_value && ptr_value[0]) if (ptr_value && ptr_value[0])
eval_context.prefix = ptr_value; eval_context->prefix = ptr_value;
/* check for custom suffix */ /* check for custom suffix */
ptr_value = hashtable_get (options, "suffix"); ptr_value = hashtable_get (options, "suffix");
if (ptr_value && ptr_value[0]) if (ptr_value && ptr_value[0])
eval_context.suffix = ptr_value; eval_context->suffix = ptr_value;
/* check for regex */ /* check for regex */
ptr_value = hashtable_get (options, "regex"); ptr_value = hashtable_get (options, "regex");
@ -1448,13 +1497,19 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
{ {
regex_replace = ptr_value; regex_replace = ptr_value;
} }
/* check for debug */
if (hashtable_has_key (options, "debug"))
eval_context->debug = string_dyn_alloc (256);
} }
EVAL_DEBUG("eval_expression(\"%s\")", expr);
/* evaluate expression */ /* evaluate expression */
if (condition) if (condition)
{ {
/* evaluate as condition (return a boolean: "0" or "1") */ /* evaluate as condition (return a boolean: "0" or "1") */
value = eval_expression_condition (expr, &eval_context); value = eval_expression_condition (expr, eval_context);
rc = eval_is_true (value); rc = eval_is_true (value);
if (value) if (value)
free (value); free (value);
@ -1466,12 +1521,12 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
{ {
/* replace with regex */ /* replace with regex */
value = eval_replace_regex (expr, regex, regex_replace, value = eval_replace_regex (expr, regex, regex_replace,
&eval_context); eval_context);
} }
else else
{ {
/* only replace variables in expression */ /* only replace variables in expression */
value = eval_replace_vars (expr, &eval_context); value = eval_replace_vars (expr, eval_context);
} }
} }
@ -1492,5 +1547,10 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
free (regex); free (regex);
} }
if (options && eval_context->debug)
hashtable_set (options, "debug_output", *(eval_context->debug));
if (eval_context->debug)
string_dyn_free (eval_context->debug, 1);
return value; return value;
} }

View File

@ -72,6 +72,7 @@ struct t_eval_context
const char *suffix; const char *suffix;
struct t_eval_regex *regex; struct t_eval_regex *regex;
int recursion_count; int recursion_count;
char **debug;
}; };
extern int eval_is_true (const char *value); extern int eval_is_true (const char *value);