diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/de/includes/autogen_user_commands.de.adoc | 156 | ||||
-rw-r--r-- | doc/en/includes/autogen_user_commands.en.adoc | 4 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 4 | ||||
-rw-r--r-- | doc/fr/includes/autogen_user_commands.fr.adoc | 4 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 4 | ||||
-rw-r--r-- | doc/it/includes/autogen_user_commands.it.adoc | 4 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 5 | ||||
-rw-r--r-- | doc/ja/includes/autogen_user_commands.ja.adoc | 4 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 5 | ||||
-rw-r--r-- | doc/pl/includes/autogen_user_commands.pl.adoc | 140 |
10 files changed, 174 insertions, 156 deletions
diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc index 77d0a6f9c..c5cd8ad74 100644 --- a/doc/de/includes/autogen_user_commands.de.adoc +++ b/doc/de/includes/autogen_user_commands.de.adoc @@ -1302,80 +1302,80 @@ infolists: zeigt Information über die Infolists an ---- /eval [-n|-s] [-d] <expression> - [-n] [-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 - -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 - -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: + [-n] [-d [-d]] -c <expression1> <operator> <expression2> + + -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 + +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. eine evaluierte Teilzeichenkette (Format: "eval:xxx") - 2. eine evaluierte Bedingung (Format: "eval_cond:xxx") - 3. eine Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx") - 4. Zeichen, die in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette") - 5. eine Zeichenkette mit einer maximalen Anzahl an Zeichen (Format: "cut:+Max,Suffix,Zeichenkette") - oder maximale Anzahl an Zeichen die auf dem Bildschirm angezeigt werden sollen (Format: "cutscr:Max,Suffix,Zeichenkette oder "cutscr:+Max,Suffix,Zeichenkette") - 6. eine Zeichenkette umkehren (Format: "rev:xxx" oder "revscr:xxx") - 7. eine Zeichenkette wiederholen (Format: "repeat:Anzahl,Zeichenkette") - 8. Länge einer Zeichenkette (Format: "length:xxx" oder "lengthscr:xxx") - 9. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color") - 10. ein Modifizierer (Format: "info:Name,Argumente", Argumente sind optional) - 11. eine Info (Format: "Info:Name,Argumente", Argumente sind optional) - 12. eine Basis 16/32/64 kodierte / dekodierte Zeichenfolge (Format: "base_encode:base,xxx" oder "base_decode:base,xxx") - 13. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format") - 14. eine Umgebungsvariable (Format: "env:XXX") - 15. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr") - 16. Ergebnis eines Ausdrucks mit Klammern und Operatoren + - * / // % ** (Format: "calc:xxx") - 17. eine Option (Format: "file.section.option") - 18. eine lokale Variable eines Buffers - 19. 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) -Die vorhandenen Namen für hdata und Variablen sind in der "Anleitung für API Erweiterung", Bereich "weechat_hdata_get". beschrieben - -Beispiele (einfache Zeichenketten): +Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority: + 1. an evaluated sub-string (format: "eval:xxx") + 2. an evaluated condition (format: "eval_cond:xxx") + 3. a string with escaped chars (format: "esc:xxx" or "\xxx") + 4. a string with chars to hide (format: "hide:char,string") + 5. 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") + 6. a reversed string (format: "rev:xxx" or "revscr:xxx") + 7. a repeated string (format: "repeat:count,string") + 8. length of a string (format: "length:xxx" or "lengthscr:xxx") + 9. a color (format: "color:xxx", see "Plugin API reference", function "color") + 10. a modifier (format: "modifier:name,data,string") + 11. an info (format: "info:name,arguments", arguments are optional) + 12. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx") + 13. current date/time (format: "date" or "date:format") + 14. an environment variable (format: "env:XXX") + 15. a ternary operator (format: "if:condition?value_if_true:value_if_false") + 16. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") + 17. an option (format: "file.section.option") + 18. a local variable in buffer + 19. 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, 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) +For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get". + +Examples (simple strings): /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.freenode_password} ==> geheim + /eval -n ${sec.data.freenode_password} ==> secret /eval -n ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 /eval -n ${window.buffer.full_name} ==> core.weechat @@ -1393,17 +1393,17 @@ Beispiele (einfache Zeichenketten): /eval -n ${base_encode:64,test} ==> dGVzdA== /eval -n ${base_decode:64,dGVzdA==} ==> test -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]] diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc index 4f9592027..43add3fa5 100644 --- a/doc/en/includes/autogen_user_commands.en.adoc +++ b/doc/en/includes/autogen_user_commands.en.adoc @@ -1302,11 +1302,11 @@ infolists: display infos about infolists ---- /eval [-n|-s] [-d] <expression> - [-n] [-d] -c <expression1> <operator> <expression2> + [-n] [-d [-d]] -c <expression1> <operator> <expression2> -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 + -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: diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 3ace5375a..03a8982a0 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2246,6 +2246,10 @@ Arguments: ** _regex_replace_: the replacement text to use with _regex_, to replace text in _expr_ (the _regex_replace_ is evaluated on each match of _regex_ against _expr_, until no match is found) +** _debug_: debug level (string with integer number ≥ 1), if enabled, a key + "debug_output" is added in hashtable _options_: +*** _1_: enable debug +*** _2_: enable more verbose debug Return value: diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc index 08dfbbb91..970aee5f3 100644 --- a/doc/fr/includes/autogen_user_commands.fr.adoc +++ b/doc/fr/includes/autogen_user_commands.fr.adoc @@ -1301,12 +1301,12 @@ infolists : afficher des infos sur les infolists * `+eval+`: évaluer une expression ---- -/eval [-n|-s] [-d] <expression> +/eval [-n|-s] [-d [-d]] <expression> [-n] [-d] -c <expression1> <opérateur> <expression2> -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) - -d : afficher la sortie de debug après l'évaluation + -d : afficher la sortie de debug après l'évaluation (avec deux -d : mode debug plus verbeux) -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 opérateur : un opérateur logique ou de comparaison : diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 49efcca75..b8a740d7e 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -2288,6 +2288,10 @@ Paramètres : remplacer du texte dans _expr_ (_regex_replace_ est évalué sur chaque correspondance de _regex_ sur _expr_, jusqu'à ce que plus aucune correspondance ne soit trouvée) +** _debug_ : niveau de debug (chaîne avec un nombre entier ≥ 1), si activé, + une clé "debug_output" est ajoutée dans la table de hachage _options_ : +*** _1_ : activer le debug +*** _2_ : activer le debug plus verbeux Valeur de retour : diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc index 9f2fe8a42..d613e8c41 100644 --- a/doc/it/includes/autogen_user_commands.it.adoc +++ b/doc/it/includes/autogen_user_commands.it.adoc @@ -1302,11 +1302,11 @@ infolists: display infos about infolists ---- /eval [-n|-s] [-d] <expression> - [-n] [-d] -c <expression1> <operator> <expression2> + [-n] [-d [-d]] -c <expression1> <operator> <expression2> -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 + -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: diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 40e960240..f32fe47c5 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -2345,6 +2345,11 @@ Argomenti: ** _regex_replace_: the replacement text to use with _regex_, to replace text in _expr_ (the _regex_replace_ is evaluated on each match of _regex_ against _expr_, until no match is found) +// TRANSLATION MISSING +** _debug_: debug level (string with integer number ≥ 1), if enabled, a key + "debug_output" is added in hashtable _options_: +*** _1_: enable debug +*** _2_: enable more verbose debug Valore restituito: diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index 2e3d10317..c16ca8d8e 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -1302,11 +1302,11 @@ infolists: インフォリストに関する情報を表示 ---- /eval [-n|-s] [-d] <expression> - [-n] [-d] -c <expression1> <operator> <expression2> + [-n] [-d [-d]] -c <expression1> <operator> <expression2> -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 + -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: diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index ca003a6fc..32c1d4400 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -2262,6 +2262,11 @@ char *weechat_string_eval_expression (const char *expr, ** _regex_replace_: _regex_ と一緒に使われる置換テキスト、_expr_ に含まれるテキストを置換する (_regex_replace_ は、_expr_ 内で _regex_ 引数にマッチする部分が見つからなくなるまで、毎回評価されます) +// TRANSLATION MISSING +** _debug_: debug level (string with integer number ≥ 1), if enabled, a key + "debug_output" is added in hashtable _options_: +*** _1_: enable debug +*** _2_: enable more verbose debug 戻り値: diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc index 4d54f655e..a3a691c1b 100644 --- a/doc/pl/includes/autogen_user_commands.pl.adoc +++ b/doc/pl/includes/autogen_user_commands.pl.adoc @@ -1300,82 +1300,81 @@ infolists: wyświetla informacje o infolistach * `+eval+`: przetwórz wyrażenie ---- -/eval [-n|-s] [-d] <wyrażenie> - [-n] [-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 - -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 - -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: +/eval [-n|-s] [-d] <expression> + [-n] [-d [-d]] -c <expression1> <operator> <expression2> + + -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 + +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. przetworzony ciąg (format: "eval:xxx") - 2. przetworzone wyrażenie (format: "eval_cond:xxx") - 3. ciąg z wyescapowanymi znakami (format: "esc:xxx" lub "\xxx") - 4. ciąg ze znakami do ukrycia (format: "hide:char,string") - 5. 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") - 6. odwrócony ciąg (format: "rev:xxx") - 7. powtórzony ciąg (format: "repeat:ilość,ciąg") - 8. długość ciągu (format: "length:xxx" or "lengthscr:xxx") - 9. kolor (format "color:xxx", zobacz „Opis API wtyczek”, funkcja "color") - 10. modyfikator (format: "modifier:name,data,string") - 11. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne) - 12. ciąg zakodowany/zdekodowany z base 16/32/64 (format: "base_encode:base,xxx" lub "base_decode:base,xxx") - 13. obecna data/czas (format: "date" lub "date:format") - 14. zmienna środowiskowa (format: "env:XXX") - 15. wyrażenie warunkowe (format: "if:condition?value_if_true:value_if_false") - 16. wynik wyrażenia z nawiasami i operatorami + - * / // % ** (format: "calc:xxx") - 17. opcja (format: plik.sekcja.opcja) - 18 zmienna lokalna w buforze - 19. 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) -Nazwy hdata i zmiennych, można znaleźć w „Opisie API wtyczek”, funkcja "weechat_hdata_get". - -Przykłady (proste ciągi): +Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority: + 1. an evaluated sub-string (format: "eval:xxx") + 2. an evaluated condition (format: "eval_cond:xxx") + 3. a string with escaped chars (format: "esc:xxx" or "\xxx") + 4. a string with chars to hide (format: "hide:char,string") + 5. 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") + 6. a reversed string (format: "rev:xxx" or "revscr:xxx") + 7. a repeated string (format: "repeat:count,string") + 8. length of a string (format: "length:xxx" or "lengthscr:xxx") + 9. a color (format: "color:xxx", see "Plugin API reference", function "color") + 10. a modifier (format: "modifier:name,data,string") + 11. an info (format: "info:name,arguments", arguments are optional) + 12. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx") + 13. current date/time (format: "date" or "date:format") + 14. an environment variable (format: "env:XXX") + 15. a ternary operator (format: "if:condition?value_if_true:value_if_false") + 16. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") + 17. an option (format: "file.section.option") + 18. a local variable in buffer + 19. 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, 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) +For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get". + +Examples (simple strings): /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.freenode_password} ==> secret + /eval -n ${sec.data.freenode_password} ==> secret /eval -n ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 /eval -n ${window.buffer.full_name} ==> core.weechat @@ -1393,7 +1392,7 @@ Przykłady (proste ciągi): /eval -n ${base_encode:64,test} ==> dGVzdA== /eval -n ${base_decode:64,dGVzdA==} ==> test -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 @@ -1403,6 +1402,7 @@ Przykłady (warunki): /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]] |