diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/de/autogen/user/weechat_commands.adoc | 132 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.adoc | 2 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 17 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.adoc | 2 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 17 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.adoc | 2 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 17 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_commands.adoc | 2 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 23 | ||||
-rw-r--r-- | doc/pl/autogen/user/weechat_commands.adoc | 2 |
10 files changed, 131 insertions, 85 deletions
diff --git a/doc/de/autogen/user/weechat_commands.adoc b/doc/de/autogen/user/weechat_commands.adoc index 07b58e15b..bef108543 100644 --- a/doc/de/autogen/user/weechat_commands.adoc +++ b/doc/de/autogen/user/weechat_commands.adoc @@ -266,68 +266,68 @@ infolists: zeigt Information über die Infolists an /eval [-n|-s] <expression> [-n] -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) - -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) - -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: display result without sending it to buffer (debug mode) + -s: split expression before evaluating it (many commands can be separated by semicolons) + -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 (wildcard "*" is allowed) + !* is NOT matching mask (wildcard "*" is allowed) + +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 Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx") - 3. Zeichen, die in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette") - 4. 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") - 5. eine Zeichenkette umkehren (Format: "rev:xxx") - 6. eine Zeichenkette wiederholen (Format: "repeat:Anzahl,Zeichenkette") - 7. Länge einer Zeichenkette (Format: "length:xxx" oder "lengthscr:xxx") - 8. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color") - 9. ein Modifizierer (Format: "info:Name,Argumente", Argumente sind optional) - 10. eine Info (Format: "Info:Name,Argumente", Argumente sind optional) - 11. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format") - 12. eine Umgebungsvariable (Format: "env:XXX") - 13. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr") - 14. Ergebnis eines Ausdrucks mit Klammern und Operatoren + - * / // % ** (Format: "calc:xxx") - 15. eine Option (Format: "file.section.option") - 16. eine lokale Variable eines Buffers - 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. -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. a string with escaped chars (format: "esc:xxx" or "\xxx") + 3. a string with chars to hide (format: "hide:char,string") + 4. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string") + or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string") + 5. a reversed string (format: "rev:xxx" or "revscr:xxx") + 6. a repeated string (format: "repeat:count,string") + 7. length of a string (format: "length:xxx" or "lengthscr:xxx") + 8. a color (format: "color:xxx", see "Plugin API reference", function "color") + 9. a modifier (format: "modifier:name,data,string") + 10. an info (format: "info:name,arguments", arguments are optional) + 11. current date/time (format: "date" or "date:format") + 12. an environment variable (format: "env:XXX") + 13. a ternary operator (format: "if:condition?value_if_true:value_if_false") + 14. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx") + 15. an option (format: "file.section.option") + 16. a local variable in buffer + 17. 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 ${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 @@ -343,16 +343,16 @@ Beispiele (einfache Zeichenketten): /eval -n ${length:test} ==> 4 /eval -n ${calc:(5+2)*3} ==> 21 -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 +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 ---- [[command_weechat_filter]] diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index 757f4bae5..904183992 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -301,7 +301,7 @@ Some variables are replaced in expression, using the format ${variable}, variabl 3. a string with chars to hide (format: "hide:char,string") 4. 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") - 5. a reversed string (format: "rev:xxx") + 5. a reversed string (format: "rev:xxx" or "revscr:xxx") 6. a repeated string (format: "repeat:count,string") 7. length of a string (format: "length:xxx" or "lengthscr:xxx") 8. a color (format: "color:xxx", see "Plugin API reference", function "color") diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 0c418a58f..e6379b358 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2464,9 +2464,20 @@ expanded to last): | `+${rev:xxx}+` + _(WeeChat ≥ 2.2)_ | - Reversed string. | - `+${rev:Hello, world!}+` | - `+!dlrow ,olleH+` + Reversed string (color codes are reversed, so the string should not contain + color codes). | + `+${rev:Hello, world!}+` + + `+${rev:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow30F ,olleH+` (no color, the color code is reversed) + +| `+${revscr:xxx}+` + + _(WeeChat ≥ 2.7)_ | + Reversed string for screen, color codes are not reversed. | + `+${revscr:Hello, world!}+` + + `+${revscr:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow ,olleH+` (`pass:[ ,olleH]` in red) | `+${repeat:count,string}+` + _(WeeChat ≥ 2.3)_ | diff --git a/doc/fr/autogen/user/weechat_commands.adoc b/doc/fr/autogen/user/weechat_commands.adoc index f5b5592cb..575609ea8 100644 --- a/doc/fr/autogen/user/weechat_commands.adoc +++ b/doc/fr/autogen/user/weechat_commands.adoc @@ -301,7 +301,7 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia 3. une chaîne avec des caractères à cacher (format : "hide:caractère,chaîne") 4. 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") - 5. une chaîne inversée (format : "rev:xxx") + 5. une chaîne inversée (format : "rev:xxx" ou "revscr:xxx") 6. une chaîne répétée (format : "repeat:nombre,chaîne") 7. longueur d'une chaîne (format : "length:xxx" ou "lengthscr:xxx") 8. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color") diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 8dce13fba..8d0514afe 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -2511,9 +2511,20 @@ première étendue à la dernière) : | `+${rev:xxx}+` + _(WeeChat ≥ 2.2)_ | - Chaîne inversée. | - `+${rev:Bonjour !}+` | - `+! ruojnoB+` + Chaîne inversée (les codes couleurs sont inversés, donc la chaîne ne devrait + pas contenir de codes couleurs). | + `+${rev:Bonjour, le monde !}+` + + `+${rev:Bonjour, ${color:red}le monde !}+` | + `+! ednom el ,ruojnoB+` + + `+! ednom el30F ,ruojnoB+` (pas de couleur, le code couleur est inversé) + +| `+${revscr:xxx}+` + + _(WeeChat ≥ 2.7)_ | + Chaîne inversée pour l'écran : les codes couleurs ne sont pas inversés. | + `+${revscr:Bonjour, le monde !}+` + + `+${revscr:Bonjour, ${color:red}le monde !}+` | + `+! ednom el ,ruojnoB+` + + `+! ednom el ,ruojnoB+` (`pass:[ ,ruojnoB]` en rouge) | `+${repeat:nombre,chaîne}+` + _(WeeChat ≥ 2.3)_ | diff --git a/doc/it/autogen/user/weechat_commands.adoc b/doc/it/autogen/user/weechat_commands.adoc index 0c052b596..322fba90e 100644 --- a/doc/it/autogen/user/weechat_commands.adoc +++ b/doc/it/autogen/user/weechat_commands.adoc @@ -301,7 +301,7 @@ Some variables are replaced in expression, using the format ${variable}, variabl 3. a string with chars to hide (format: "hide:char,string") 4. 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") - 5. a reversed string (format: "rev:xxx") + 5. a reversed string (format: "rev:xxx" or "revscr:xxx") 6. a repeated string (format: "repeat:count,string") 7. length of a string (format: "length:xxx" or "lengthscr:xxx") 8. a color (format: "color:xxx", see "Plugin API reference", function "color") diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index d97593917..39ed5c073 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -2572,9 +2572,20 @@ expanded to last): | `+${rev:xxx}+` + _(WeeChat ≥ 2.2)_ | - Reversed string. | - `+${rev:Hello, world!}+` | - `+!dlrow ,olleH+` + Reversed string (color codes are reversed, so the string should not contain + color codes). | + `+${rev:Hello, world!}+` + + `+${rev:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow30F ,olleH+` (no color, the color code is reversed) + +| `+${revscr:xxx}+` + + _(WeeChat ≥ 2.7)_ | + Reversed string for screen, color codes are not reversed. | + `+${revscr:Hello, world!}+` + + `+${revscr:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow ,olleH+` (`pass:[ ,olleH]` in red) | `+${repeat:count,string}+` + _(WeeChat ≥ 2.3)_ | diff --git a/doc/ja/autogen/user/weechat_commands.adoc b/doc/ja/autogen/user/weechat_commands.adoc index 18c771df3..b0f02efe9 100644 --- a/doc/ja/autogen/user/weechat_commands.adoc +++ b/doc/ja/autogen/user/weechat_commands.adoc @@ -301,7 +301,7 @@ Some variables are replaced in expression, using the format ${variable}, variabl 3. a string with chars to hide (format: "hide:char,string") 4. 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") - 5. a reversed string (format: "rev:xxx") + 5. a reversed string (format: "rev:xxx" or "revscr:xxx") 6. a repeated string (format: "repeat:count,string") 7. length of a string (format: "length:xxx" or "lengthscr:xxx") 8. a color (format: "color:xxx", see "Plugin API reference", function "color") diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 44ce35ddb..bc1dedf7e 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -2473,11 +2473,24 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio `+thi…+` + `+こ>>+` +// TRANSLATION MISSING | `+${rev:xxx}+` + _(WeeChat バージョン 2.2 以上で利用可)_ | - 文字順を反転させた文字列。| - `+${rev:Hello, world!}+` | - `+!dlrow ,olleH+` + Reversed string (color codes are reversed, so the string should not contain + color codes). | + `+${rev:Hello, world!}+` + + `+${rev:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow30F ,olleH+` (no color, the color code is reversed) + +// TRANSLATION MISSING +| `+${revscr:xxx}+` + + _(WeeChat バージョン 2.7 以上で利用可)_ | + Reversed string for screen, color codes are not reversed. | + `+${revscr:Hello, world!}+` + + `+${revscr:Hello, ${color:red}world!}+` | + `+!dlrow ,olleH+` + + `+!dlrow ,olleH+` (`pass:[ ,olleH]` in red) | `+${repeat:count,string}+` + _(WeeChat バージョン 2.3 以上で利用可)_ | @@ -2487,7 +2500,7 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio // TRANSLATION MISSING | `+${length:xxx}+` + - _(WeeChat ≥ 2.7)_ | + _(WeeChat バージョン 2.7 以上で利用可)_ | Length of string (number of UTF-8 chars), color codes are ignored. | `+${length:test}+` + `+${length:こんにちは世界}+` | @@ -2496,7 +2509,7 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio // TRANSLATION MISSING | `+${lengthscr:xxx}+` + - _(WeeChat ≥ 2.7)_ | + _(WeeChat バージョン 2.7 以上で利用可)_ | Length of string displayed on screen, color codes are ignored. | `+${lengthscr:test}+` + `+${lengthscr:こんにちは世界}+` | diff --git a/doc/pl/autogen/user/weechat_commands.adoc b/doc/pl/autogen/user/weechat_commands.adoc index 72ebb7dec..6600f929c 100644 --- a/doc/pl/autogen/user/weechat_commands.adoc +++ b/doc/pl/autogen/user/weechat_commands.adoc @@ -301,7 +301,7 @@ Some variables are replaced in expression, using the format ${variable}, variabl 3. a string with chars to hide (format: "hide:char,string") 4. 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") - 5. a reversed string (format: "rev:xxx") + 5. a reversed string (format: "rev:xxx" or "revscr:xxx") 6. a repeated string (format: "repeat:count,string") 7. length of a string (format: "length:xxx" or "lengthscr:xxx") 8. a color (format: "color:xxx", see "Plugin API reference", function "color") |