core: allow pointer as list name in evaluation of hdata (closes #450)
parent
43f471b9c2
commit
a79c0fcff3
|
@ -19,6 +19,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
|||
|
||||
=== New features
|
||||
|
||||
* core: allow pointer as list name in evaluation of hdata (closes #450)
|
||||
* core: add signal "signal_sighup"
|
||||
* logger: evaluate content of option logger.file.path (issue #388)
|
||||
* relay: display value of HTTP header "X-Real-IP" for websocket connections
|
||||
|
|
|
@ -251,47 +251,49 @@ infolists: zeigt Information über die Infolists an
|
|||
/eval [-n|-s] <expression>
|
||||
[-n] -c <expression1> <operator> <expression2>
|
||||
|
||||
-n: gibt das Ergebnis aus, ohne das 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
|
||||
-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
|
||||
|
||||
Ein Ausdruck gilt als "wahr", sofern das Ergebnis nicht NULL, nicht leer und von "0" abweichend ist.
|
||||
Der Vergleich findet zwischen zwei Integer Werten statt, sofern die beiden Ausdrücke gültige Integer-Werte sind.
|
||||
Um einen Vergleich zwischen zwei Zeichenketten zu erzwingen, müssen die Ausdrücke in Anführungszeichen gesetzt werden, zum Beispiel:
|
||||
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
|
||||
The comparison is made using integers if the two expressions are valid integers.
|
||||
To force a string comparison, 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 Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx")
|
||||
2. Zeichen welche in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette")
|
||||
3. eine Farbe (Format: color:xxx)
|
||||
4. eine Info (Format: "info:name,arguments", Argumente sind optional)
|
||||
5. eine Umgebungsvariable (Format: "env:XXX")
|
||||
6. der Name einer Programmoption (Format: file.section.option)
|
||||
7. der Name einer lokalen Variablen eines Buffer
|
||||
8. ein hdata Name/Variable (der Wert wird automatisch als 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
|
||||
Die vorhandenen Namen für hdata und Variablen sind in der "Anleitung für API Erweiterung", Bereich "weechat_hdata_get". beschrieben
|
||||
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
|
||||
1. a string with escaped chars (format: "esc:xxx" or "\xxx")
|
||||
2. a string with chars to hide (format: "hide:char,string")
|
||||
3. a color (format: "color:xxx")
|
||||
4. an info (format: "info:name,arguments", arguments are optional)
|
||||
5. an environment variable (format: "env:XXX")
|
||||
6. an option (format: "file.section.option")
|
||||
7. a local variable in buffer
|
||||
8. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
Format for hdata can be one of following:
|
||||
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
|
||||
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
|
||||
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
|
||||
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
|
||||
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
|
||||
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
|
||||
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 ${env:HOME} ==> /home/user
|
||||
/eval -n ${weechat.look.scroll_amount} ==> 3
|
||||
|
@ -302,15 +304,15 @@ Beispiele (einfache Zeichenketten):
|
|||
/eval -n ${\t} ==> <tab>
|
||||
/eval -n ${hide:-,${relay.network.password}} ==> --------
|
||||
|
||||
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
|
||||
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
|
||||
----
|
||||
|
||||
[[command_weechat_filter]]
|
||||
|
|
|
@ -3322,6 +3322,14 @@ und die Daten in einer Hashtable gesichert:
|
|||
| arguments | string | Argumente des Befehls (Beinhaltet Wert von 'channel')
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
When the data is a pointer, the variable `tg_signal_data` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
|
@ -286,8 +286,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl
|
|||
8. 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:
|
||||
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
|
||||
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
|
||||
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
|
||||
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
|
||||
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
|
||||
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
|
||||
|
||||
|
|
|
@ -3238,6 +3238,13 @@ is added in hashtable:
|
|||
| arguments | string | Arguments of command (includes value of 'channel')
|
||||
|===
|
||||
|
||||
When the data is a pointer, the variable `tg_signal_data` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
|
@ -286,8 +286,9 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia
|
|||
8. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
|
||||
Le format du hdata peut être le suivant :
|
||||
hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)
|
||||
hdata[list].var1.var2... : démarrer avec un hdata en utilisant une liste, par exemple :
|
||||
hdata[list].var1.var2... : démarrer avec un hdata en utilisant une liste/pointeur, par exemple :
|
||||
${buffer[gui_buffers].full_name} : nom complet du premier tampon dans la liste chaînée des tampons
|
||||
${buffer[0x1234abcd].full_name} : nom complet du tampon avec ce pointeur (peut être utilisé dans les triggers)
|
||||
${plugin[weechat_plugins].name} : nom de la première extension dans la liste chaînée des extensions
|
||||
Pour le nom du hdata et des variables, voir la "Référence API extension", fonction "weechat_hdata_get".
|
||||
|
||||
|
|
|
@ -3341,6 +3341,14 @@ suivantes sont ajoutées dans la table de hachage :
|
|||
| arguments | chaîne | Paramètres de la commande (inclut la valeur de 'channel')
|
||||
|===
|
||||
|
||||
Lorsque la donnée est un pointeur, la variable `tg_signal_data` peut être
|
||||
utilisée comme ceci pour lire une propriété hdata (dans cet exemple il s'agit
|
||||
d'un pointeur sur un tampon) :
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
|
@ -286,8 +286,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl
|
|||
8. 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:
|
||||
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
|
||||
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
|
||||
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
|
||||
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
|
||||
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
|
||||
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
|
||||
|
||||
|
|
|
@ -3399,6 +3399,13 @@ is added in hashtable:
|
|||
| arguments | string | Arguments of command (includes value of 'channel')
|
||||
|===
|
||||
|
||||
When the data is a pointer, the variable `tg_signal_data` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
|
@ -251,47 +251,49 @@ infolists: infolist に関する情報を表示
|
|||
/eval [-n|-s] <expression>
|
||||
[-n] -c <expression1> <operator> <expression2>
|
||||
|
||||
-n: 結果をバッファに送信せずに表示 (デバッグモード)
|
||||
-s: 評価前に式を分割する (複数のコマンドを指定する場合はセミコロンで区切ってください)
|
||||
-c: 条件として評価: 演算子と括弧をを使い、ブール値 ("0" または "1") を返します
|
||||
expression: 評価する式、フォーマット、${variable} 型のフォーマットの変数は置換されます (以下を参照); 複数のコマンドを指定する場合はセミコロンで区切ってください
|
||||
operator: 論理演算子や比較演算子:
|
||||
- 論理演算子:
|
||||
&& ブール演算の "and"
|
||||
|| ブール演算の "or"
|
||||
- 比較演算子:
|
||||
== 等しい
|
||||
!= 等しくない
|
||||
<= 以下
|
||||
< より少ない
|
||||
>= 以上
|
||||
> より大きい
|
||||
=~ 正規表現にマッチ
|
||||
!~ 正規表現にマッチしない
|
||||
-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
|
||||
|
||||
式が NULL でない場合、空でない場合、"0" でない場合、式は "真" と評価されます。
|
||||
両方の式が有効な整数である場合、比較は整数を使って行われます。
|
||||
文字列比較を強制するには、それぞれの式をダブルクォートで囲みます、例:
|
||||
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
|
||||
The comparison is made using integers if the two expressions are valid integers.
|
||||
To force a string comparison, add double quotes around each expression, for example:
|
||||
50 > 100 ==> 0
|
||||
"50" > "100" ==> 1
|
||||
|
||||
式中の ${variable} 型のフォーマットの変数は置換されます。変数は以下の優先順位に従います:
|
||||
1. エスケープ文字を含む文字列 (フォーマット: "esc:xxx" または "\xxx")
|
||||
2. 隠す文字を含む文字列 (フォーマット: "hide:char,string")
|
||||
3. 色 (フォーマット: "color:xxx")
|
||||
4. 情報 (フォーマット: "info:name,arguments"、arguments は任意)
|
||||
5. 環境変数 (フォーマット: "env:XXX")
|
||||
6. オプション (フォーマット: "file.section.option")
|
||||
7. バッファのローカル変数
|
||||
8. hdata の名前/変数 (値は自動的に文字列に変換されます)、デフォルトでは "window" と "buffer" は現在のウィンドウ/バッファを指します。
|
||||
hdata のフォーマットは以下の 1 つです:
|
||||
hdata.var1.var2...: hdata (ポインタは既知) で始まり、1 個ずつ変数を続ける (他の hdata を続けることも可能)
|
||||
hdata(list).var1.var2...: リストを使って hdata を始める、例:
|
||||
${buffer[gui_buffers].full_name}: バッファリストにリンクされた最初のバッファのフルネーム
|
||||
${plugin[weechat_plugins].name}: プラグインリストにリンクされた最初のプラグインの名前
|
||||
hdata と変数の名前については、"プラグイン API リファレンス" の "weechat_hdata_get" 関数を参照してください。
|
||||
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
|
||||
1. a string with escaped chars (format: "esc:xxx" or "\xxx")
|
||||
2. a string with chars to hide (format: "hide:char,string")
|
||||
3. a color (format: "color:xxx")
|
||||
4. an info (format: "info:name,arguments", arguments are optional)
|
||||
5. an environment variable (format: "env:XXX")
|
||||
6. an option (format: "file.section.option")
|
||||
7. a local variable in buffer
|
||||
8. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
Format for hdata can be one of following:
|
||||
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
|
||||
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
|
||||
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
|
||||
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
|
||||
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
|
||||
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
|
||||
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
|
||||
|
@ -302,7 +304,7 @@ hdata と変数の名前については、"プラグイン API リファレン
|
|||
/eval -n ${\t} ==> <tab>
|
||||
/eval -n ${hide:-,${relay.network.password}} ==> --------
|
||||
|
||||
例 (条件):
|
||||
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
|
||||
|
|
|
@ -3237,6 +3237,14 @@ ${tg_highlight} || ${tg_msg_pv}
|
|||
| arguments | string | コマンドの引数 ('channel' の値を含みます)
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
When the data is a pointer, the variable `tg_signal_data` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
|
@ -251,47 +251,49 @@ infolists: wyświetla informacje o infolistach
|
|||
/eval [-n|-s] <wyrażenie>
|
||||
[-n] -c <wyrażenie1> <operator> <wyrażenie2>
|
||||
|
||||
-n: wyświetla wynik bez wysyłania go do buforu (tryb debugowania)
|
||||
-s: podziel wyażenie przed przetworzeniem go (wiele komend może być oddzielonych średnikami)
|
||||
-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:
|
||||
&& boolowskie "i"
|
||||
|| boolowskie "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
|
||||
-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
|
||||
|
||||
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 celu wymuszenia porównywania ciągów, należy umieścić każde wyrażenie w cudzysłowie, na przykład:
|
||||
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
|
||||
The comparison is made using integers if the two expressions are valid integers.
|
||||
To force a string comparison, 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. ciąg z wyescapowanymi znakami (format: "esc:xxx" lub "\xxx")
|
||||
2. ciąg ze znakami do ukrycia (format: "hide:char,string")
|
||||
3. kolor (format color:xxx)
|
||||
4. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne)
|
||||
5. zmienna środowiskowa (format: "env:XXX")
|
||||
6. opcja (format: plik.sekcja.opcja)
|
||||
7. zmienna lokalna w buforze
|
||||
8. 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
|
||||
Nazwy hdata i zmiennych, można znaleźć w "Opisie API wtyczek", fukcja "weechat_hdata_get".
|
||||
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
|
||||
1. a string with escaped chars (format: "esc:xxx" or "\xxx")
|
||||
2. a string with chars to hide (format: "hide:char,string")
|
||||
3. a color (format: "color:xxx")
|
||||
4. an info (format: "info:name,arguments", arguments are optional)
|
||||
5. an environment variable (format: "env:XXX")
|
||||
6. an option (format: "file.section.option")
|
||||
7. a local variable in buffer
|
||||
8. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
Format for hdata can be one of following:
|
||||
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
|
||||
hdata[list].var1.var2...: start with a hdata using a list/pointer, for example:
|
||||
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
|
||||
hdata[pointer].var1.var2...: start with a hdata using a list, for example:
|
||||
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
|
||||
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
|
||||
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 ${env:HOME} ==> /home/user
|
||||
/eval -n ${weechat.look.scroll_amount} ==> 3
|
||||
|
@ -302,7 +304,7 @@ Przykłady (proste ciągi):
|
|||
/eval -n ${\t} ==> <tab>
|
||||
/eval -n ${hide:-,${relay.network.password}} ==> --------
|
||||
|
||||
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
|
||||
|
|
|
@ -3267,6 +3267,14 @@ są dodawane do tablicy hashy:
|
|||
| arguments | ciąg | Argumenty komendy (razem z wartością 'channel')
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
When the data is a pointer, the variable `tg_signal_data` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
----
|
||||
${buffer[${tg_signal_data}].full_name}
|
||||
----
|
||||
|
||||
[[trigger_data_hsignal]]
|
||||
===== Hsignal
|
||||
|
||||
|
|
9
po/cs.po
9
po/cs.po
|
@ -20,7 +20,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1480,9 +1480,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
10
po/de.po
10
po/de.po
|
@ -24,7 +24,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-06-13 22:57+0100\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <>\n"
|
||||
|
@ -1544,6 +1544,7 @@ msgstr "evaluierter Ausdruck"
|
|||
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -s: split expression before evaluating it (many commands can be "
|
||||
|
@ -1589,9 +1590,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
9
po/es.po
9
po/es.po
|
@ -22,7 +22,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1519,9 +1519,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
17
po/fr.po
17
po/fr.po
|
@ -21,8 +21,8 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"PO-Revision-Date: 2015-06-20 08:06+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-06-23 20:47+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
|
@ -1561,9 +1561,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
@ -1641,10 +1646,12 @@ msgstr ""
|
|||
" hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), "
|
||||
"et demander les variables l'une après l'autre (d'autres hdata peuvent être "
|
||||
"suivis)\n"
|
||||
" hdata[list].var1.var2... : démarrer avec un hdata en utilisant une liste, "
|
||||
"par exemple :\n"
|
||||
" hdata[list].var1.var2... : démarrer avec un hdata en utilisant une liste/"
|
||||
"pointeur, par exemple :\n"
|
||||
" ${buffer[gui_buffers].full_name} : nom complet du premier tampon dans la "
|
||||
"liste chaînée des tampons\n"
|
||||
" ${buffer[0x1234abcd].full_name} : nom complet du tampon avec ce pointeur "
|
||||
"(peut être utilisé dans les triggers)\n"
|
||||
" ${plugin[weechat_plugins].name} : nom de la première extension dans la "
|
||||
"liste chaînée des extensions\n"
|
||||
"Pour le nom du hdata et des variables, voir la \"Référence API extension\", "
|
||||
|
|
9
po/hu.po
9
po/hu.po
|
@ -20,7 +20,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1411,9 +1411,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
9
po/it.po
9
po/it.po
|
@ -20,7 +20,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1502,9 +1502,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
10
po/ja.po
10
po/ja.po
|
@ -20,7 +20,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-06-21 22:54+0900\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
|
||||
|
@ -1480,6 +1480,7 @@ msgstr "式を評価"
|
|||
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -s: split expression before evaluating it (many commands can be "
|
||||
|
@ -1525,9 +1526,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
10
po/pl.po
10
po/pl.po
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-05-09 14:00+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1516,6 +1516,7 @@ msgstr "przetwórz wyrażenie"
|
|||
msgid "[-n|-s] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n|-s] <wyrażenie> || [-n] -c <wyrażenie1> <operator> <wyrażenie2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -s: split expression before evaluating it (many commands can be "
|
||||
|
@ -1561,9 +1562,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1564,9 +1564,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
9
po/ru.po
9
po/ru.po
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1433,9 +1433,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
9
po/tr.po
9
po/tr.po
|
@ -20,7 +20,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
|
||||
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1268,9 +1268,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-06-20 08:05+0200\n"
|
||||
"POT-Creation-Date: 2015-06-23 20:46+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1270,9 +1270,14 @@ msgid ""
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
"variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for example:\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list/pointer, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
|
||||
"list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
|
||||
"pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked list of "
|
||||
"plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API reference\", "
|
||||
|
|
|
@ -7204,12 +7204,16 @@ command_init ()
|
|||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), "
|
||||
"and ask variables one after one (other hdata can be followed)\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a list, for "
|
||||
"example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer in "
|
||||
"linked list of buffers\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in linked "
|
||||
"list of plugins\n"
|
||||
" hdata[list].var1.var2...: start with a hdata using a "
|
||||
"list/pointer, for example:\n"
|
||||
" ${buffer[gui_buffers].full_name}: full name of first buffer "
|
||||
"in linked list of buffers\n"
|
||||
" hdata[pointer].var1.var2...: start with a hdata using a list, "
|
||||
"for example:\n"
|
||||
" ${buffer[0x1234abcd].full_name}: full name of the buffer "
|
||||
"with this pointer (can be used in triggers)\n"
|
||||
" ${plugin[weechat_plugins].name}: name of first plugin in "
|
||||
"linked list of plugins\n"
|
||||
"For name of hdata and variables, please look at \"Plugin API "
|
||||
"reference\", function \"weechat_hdata_get\".\n"
|
||||
"\n"
|
||||
|
|
|
@ -248,8 +248,9 @@ eval_replace_vars_cb (void *data, const char *text)
|
|||
const char *ptr_value, *ptr_arguments, *ptr_string;
|
||||
struct t_hdata *hdata;
|
||||
void *pointer;
|
||||
int i, length_hide_char, length, index;
|
||||
int i, length_hide_char, length, index, rc;
|
||||
long number;
|
||||
long unsigned int ptr;
|
||||
|
||||
pointers = (struct t_hashtable *)(((void **)data)[0]);
|
||||
extra_vars = (struct t_hashtable *)(((void **)data)[1]);
|
||||
|
@ -438,7 +439,23 @@ eval_replace_vars_cb (void *data, const char *text)
|
|||
goto end;
|
||||
|
||||
if (list_name)
|
||||
pointer = hdata_get_list (hdata, list_name);
|
||||
{
|
||||
if (strncmp (list_name, "0x", 2) == 0)
|
||||
{
|
||||
rc = sscanf (list_name, "%lx", &ptr);
|
||||
if ((rc != EOF) && (rc != 0))
|
||||
{
|
||||
pointer = (void *)ptr;
|
||||
if (!hdata_check_pointer (hdata, NULL, pointer))
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
pointer = hdata_get_list (hdata, list_name);
|
||||
}
|
||||
|
||||
if (!pointer)
|
||||
{
|
||||
pointer = hashtable_get (pointers, hdata_name);
|
||||
|
|
Loading…
Reference in New Issue