diff options
-rw-r--r-- | ChangeLog.asciidoc | 5 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.asciidoc | 108 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.asciidoc | 8 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.asciidoc | 6 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.asciidoc | 8 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.asciidoc | 6 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.asciidoc | 8 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.asciidoc | 6 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_commands.asciidoc | 78 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.asciidoc | 7 | ||||
-rw-r--r-- | doc/pl/autogen/user/weechat_commands.asciidoc | 8 | ||||
-rw-r--r-- | po/cs.po | 10 | ||||
-rw-r--r-- | po/de.po | 11 | ||||
-rw-r--r-- | po/es.po | 10 | ||||
-rw-r--r-- | po/fr.po | 20 | ||||
-rw-r--r-- | po/hu.po | 10 | ||||
-rw-r--r-- | po/it.po | 10 | ||||
-rw-r--r-- | po/ja.po | 11 | ||||
-rw-r--r-- | po/pl.po | 10 | ||||
-rw-r--r-- | po/pt_BR.po | 10 | ||||
-rw-r--r-- | po/ru.po | 10 | ||||
-rw-r--r-- | po/tr.po | 10 | ||||
-rw-r--r-- | po/weechat.pot | 10 | ||||
-rw-r--r-- | src/core/wee-command.c | 8 | ||||
-rw-r--r-- | src/core/wee-eval.c | 14 |
25 files changed, 239 insertions, 163 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 90f423ce9..282547d59 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -19,7 +19,6 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] === New features -* core: add support of full color option name in command /eval * core: use environment variable WEECHAT_HOME on startup (closes #391) * core: remove WeeChat version from config files (closes #407) * core: add options weechat.look.quote_{nick_prefix|nick_suffix|time_format} to @@ -33,8 +32,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * core: add option "-s" in command /eval to split expression before evaluating it (no more split by default) (closes #324) * core: add priority in plugins to initialize them in order +* api: add support of environment variables in function + string_eval_expression() and command /eval * api: add support of full color option name in functions color() and - string_eval_expression() + string_eval_expression() and in command /eval * api: add "_chat_line" (line pointer) in hashtable of hook_focus * irc: add support of SHA-256 and SHA-512 algorithms in server option "ssl_fingerprint" (closes #281) diff --git a/doc/de/autogen/user/weechat_commands.asciidoc b/doc/de/autogen/user/weechat_commands.asciidoc index 9446fb035..06ad7b6a4 100644 --- a/doc/de/autogen/user/weechat_commands.asciidoc +++ b/doc/de/autogen/user/weechat_commands.asciidoc @@ -251,64 +251,66 @@ 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 - -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: + -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 + +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. der Name einer Einstellung (Format: file.section.option) - 6. der Name einer lokalen Variablen eines Buffer - 7. 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 - -Beispiele (einfache Zeichenketten): - /eval -n ${info:version} ==> 0.4.3 - /eval -n ${weechat.look.scroll_amount} ==> 3 - /eval -n ${window} ==> 0x2549aa0 - /eval -n ${window.buffer} ==> 0x2549320 - /eval -n ${window.buffer.full_name} ==> core.weechat - /eval -n ${window.buffer.number} ==> 1 - /eval -n ${\t} ==> <tab> +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, 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 +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 ${window} ==> 0x2549aa0 + /eval -n ${window.buffer} ==> 0x2549320 + /eval -n ${window.buffer.full_name} ==> core.weechat + /eval -n ${window.buffer.number} ==> 1 + /eval -n ${\t} ==> <tab> /eval -n ${hide:-,${relay.network.password}} ==> -------- -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]] diff --git a/doc/en/autogen/user/weechat_commands.asciidoc b/doc/en/autogen/user/weechat_commands.asciidoc index d5031c4f6..999b4f38e 100644 --- a/doc/en/autogen/user/weechat_commands.asciidoc +++ b/doc/en/autogen/user/weechat_commands.asciidoc @@ -280,9 +280,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl 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 option (format: "file.section.option") - 6. a local variable in buffer - 7. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 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, for example: @@ -292,6 +293,7 @@ For name of hdata and variables, please look at "Plugin API reference", function 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 ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc index 001053c5c..ceef1bb94 100644 --- a/doc/en/weechat_plugin_api.en.asciidoc +++ b/doc/en/weechat_plugin_api.en.asciidoc @@ -1938,6 +1938,12 @@ expanded to last): `1.0` + `lightblue` +| `${env:NAME}` + + (_WeeChat ≥ 1.2_) | + Value of the environment variable `NAME` | + `${env:HOME}` | + `/home/user` + | `${sec.data.name}` | Value of the secured data `name` | `${sec.data.freenode_pass}` | diff --git a/doc/fr/autogen/user/weechat_commands.asciidoc b/doc/fr/autogen/user/weechat_commands.asciidoc index 84932ff3e..4f2e4c33d 100644 --- a/doc/fr/autogen/user/weechat_commands.asciidoc +++ b/doc/fr/autogen/user/weechat_commands.asciidoc @@ -280,9 +280,10 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia 2. une chaîne avec des caractères à cacher (format : "hide:caractère,chaîne") 3. une couleur (format : "color:xxx") 4. une info (format : "info:nom,paramètres", les paramètres sont optionnels) - 5. une option (format : "fichier.section.option") - 6. une variable locale du tampon - 7. 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. + 5. une variable d'environnement (format : "env:XXX") + 6. une option (format : "fichier.section.option") + 7. une variable locale du tampon + 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 : @@ -292,6 +293,7 @@ Pour le nom du hdata et des variables, voir la "Référence API extension", fonc Exemples (chaînes simples) : /eval -n ${info:version} ==> 0.4.3 + /eval -n ${env:HOME} ==> /home/user /eval -n ${weechat.look.scroll_amount} ==> 3 /eval -n ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc index eb6e80984..f2877584d 100644 --- a/doc/fr/weechat_plugin_api.fr.asciidoc +++ b/doc/fr/weechat_plugin_api.fr.asciidoc @@ -1978,6 +1978,12 @@ première étendue à la dernière) : `1.0` + `lightblue` +| `${env:NOM}` + + (_WeeChat ≥ 1.2_) | + Valeur de la variable d'environnement `NOM` | + `${env:HOME}` | + `/home/user` + | `${sec.data.nom}` | Valeur de la donnée sécurisée `nom` | `${sec.data.freenode_pass}` | diff --git a/doc/it/autogen/user/weechat_commands.asciidoc b/doc/it/autogen/user/weechat_commands.asciidoc index f991f43f1..93d39765f 100644 --- a/doc/it/autogen/user/weechat_commands.asciidoc +++ b/doc/it/autogen/user/weechat_commands.asciidoc @@ -280,9 +280,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl 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 option (format: "file.section.option") - 6. a local variable in buffer - 7. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 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, for example: @@ -292,6 +293,7 @@ For name of hdata and variables, please look at "Plugin API reference", function 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 ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc index 8acd6d754..827e485e4 100644 --- a/doc/it/weechat_plugin_api.it.asciidoc +++ b/doc/it/weechat_plugin_api.it.asciidoc @@ -2006,6 +2006,12 @@ expanded to last): `1.0` + `lightblue` +| `${env:NAME}` + + (_WeeChat ≥ 1.2_) | + Value of the environment variable `NAME` | + `${env:HOME}` | + `/home/user` + | `${sec.data.name}` | Value of the secured data `name` | `${sec.data.freenode_pass}` | diff --git a/doc/ja/autogen/user/weechat_commands.asciidoc b/doc/ja/autogen/user/weechat_commands.asciidoc index 25783327f..876c529a0 100644 --- a/doc/ja/autogen/user/weechat_commands.asciidoc +++ b/doc/ja/autogen/user/weechat_commands.asciidoc @@ -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" - - 比較演算子: - == 等しい - != 等しくない - <= 以下 - < より少ない - >= 以上 - > より大きい - =~ 正規表現にマッチ - !~ 正規表現にマッチしない - -式が NULL でない場合、空でない場合、"0" でない場合、式は "真" と評価されます。 -両方の式が有効な整数である場合、比較は整数を使って行われます。 -文字列比較を強制するには、それぞれの式をダブルクォートで囲みます、例: + -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 + +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. オプション (フォーマット: "file.section.option") - 6. バッファのローカル変数 - 7. 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, 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 +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 ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 @@ -300,7 +302,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 diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc index a391224f6..a4a3f6abf 100644 --- a/doc/ja/weechat_plugin_api.ja.asciidoc +++ b/doc/ja/weechat_plugin_api.ja.asciidoc @@ -1940,6 +1940,13 @@ char *weechat_string_eval_expression (const char *expr, `1.0` + `lightblue` +// TRANSLATION MISSING +| `${env:NAME}` + + (_WeeChat ≥ 1.2_) | + Value of the environment variable `NAME` | + `${env:HOME}` | + `/home/user` + | `${sec.data.name}` | セキュアデータ `name` の値 | `${sec.data.freenode_pass}` | diff --git a/doc/pl/autogen/user/weechat_commands.asciidoc b/doc/pl/autogen/user/weechat_commands.asciidoc index aa74e77ae..7b8e1f6aa 100644 --- a/doc/pl/autogen/user/weechat_commands.asciidoc +++ b/doc/pl/autogen/user/weechat_commands.asciidoc @@ -280,9 +280,10 @@ Some variables are replaced in expression, using the format ${variable}, variabl 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 option (format: "file.section.option") - 6. a local variable in buffer - 7. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer. + 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, for example: @@ -292,6 +293,7 @@ For name of hdata and variables, please look at "Plugin API reference", function 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 ${window} ==> 0x2549aa0 /eval -n ${window.buffer} ==> 0x2549320 @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1472,9 +1472,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1489,6 +1490,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+0200\n" "PO-Revision-Date: 2015-04-25 16:34+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 " @@ -1581,9 +1582,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1598,6 +1600,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1511,9 +1511,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1528,6 +1529,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" -"PO-Revision-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"PO-Revision-Date: 2015-04-26 11:43+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -1553,9 +1553,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1570,6 +1571,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -1629,9 +1631,10 @@ msgstr "" " 3. une couleur (format : \"color:xxx\")\n" " 4. une info (format : \"info:nom,paramètres\", les paramètres sont " "optionnels)\n" -" 5. une option (format : \"fichier.section.option\")\n" -" 6. une variable locale du tampon\n" -" 7. un hdata/variable (la valeur est automatiquement convertie en chaîne), " +" 5. une variable d'environnement (format : \"env:XXX\")\n" +" 6. une option (format : \"fichier.section.option\")\n" +" 7. une variable locale du tampon\n" +" 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.\n" "Le format du hdata peut être le suivant :\n" @@ -1649,6 +1652,7 @@ msgstr "" "\n" "Exemples (chaînes simples) :\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1403,9 +1403,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1420,6 +1421,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1494,9 +1494,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1511,6 +1512,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+0200\n" "PO-Revision-Date: 2015-04-25 08:10+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n" @@ -1479,6 +1479,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 " @@ -1516,9 +1517,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1533,6 +1535,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1528,9 +1528,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1545,6 +1546,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 0a6eb6b9d..ee72fc177 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1556,9 +1556,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1573,6 +1574,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1425,9 +1425,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1442,6 +1443,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1260,9 +1260,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1277,6 +1278,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" diff --git a/po/weechat.pot b/po/weechat.pot index d0571b0cd..ff59dec24 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-25 12:59+0200\n" +"POT-Creation-Date: 2015-04-26 10:44+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" @@ -1262,9 +1262,10 @@ msgid "" " 2. a string with chars to hide (format: \"hide:char,string\")\n" " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 5. an option (format: \"file.section.option\")\n" -" 6. a local variable in buffer\n" -" 7. a hdata name/variable (the value is automatically converted to string), " +" 5. an environment variable (format: \"env:XXX\")\n" +" 6. an option (format: \"file.section.option\")\n" +" 7. a local variable in buffer\n" +" 8. a hdata name/variable (the value is automatically converted to string), " "by default \"window\" and \"buffer\" point to current window/buffer.\n" "Format for hdata can be one of following:\n" " hdata.var1.var2...: start with a hdata (pointer must be known), and ask " @@ -1279,6 +1280,7 @@ msgid "" "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" +" /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 112e3b732..960e4c42b 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -7195,9 +7195,10 @@ command_init () " 3. a color (format: \"color:xxx\")\n" " 4. an info (format: \"info:name,arguments\", arguments are " "optional)\n" - " 5. an option (format: \"file.section.option\")\n" - " 6. a local variable in buffer\n" - " 7. a hdata name/variable (the value is automatically converted " + " 5. an environment variable (format: \"env:XXX\")\n" + " 6. an option (format: \"file.section.option\")\n" + " 7. a local variable in buffer\n" + " 8. a hdata name/variable (the value is automatically converted " "to string), by default \"window\" and \"buffer\" point to current " "window/buffer.\n" "Format for hdata can be one of following:\n" @@ -7214,6 +7215,7 @@ command_init () "\n" "Examples (simple strings):\n" " /eval -n ${info:version} ==> 0.4.3\n" + " /eval -n ${env:HOME} ==> /home/user\n" " /eval -n ${weechat.look.scroll_amount} ==> 3\n" " /eval -n ${window} ==> 0x2549aa0\n" " /eval -n ${window.buffer} ==> 0x2549320\n" diff --git a/src/core/wee-eval.c b/src/core/wee-eval.c index acf03aa89..8d0216718 100644 --- a/src/core/wee-eval.c +++ b/src/core/wee-eval.c @@ -352,7 +352,15 @@ eval_replace_vars_cb (void *data, const char *text) return strdup ((ptr_value) ? ptr_value : ""); } - /* 7. option: if found, return this value */ + /* 7. environment variable */ + if (strncmp (text, "env:", 4) == 0) + { + ptr_value = getenv (text + 4); + if (ptr_value) + return strdup (ptr_value); + } + + /* 8. option: if found, return this value */ if (strncmp (text, "sec.data.", 9) == 0) { ptr_value = hashtable_get (secure_hashtable_data, text + 9); @@ -385,7 +393,7 @@ eval_replace_vars_cb (void *data, const char *text) } } - /* 8. local variable in buffer */ + /* 9. local variable in buffer */ ptr_buffer = hashtable_get (pointers, "buffer"); if (ptr_buffer) { @@ -394,7 +402,7 @@ eval_replace_vars_cb (void *data, const char *text) return strdup (ptr_value); } - /* 9. hdata */ + /* 10. hdata */ value = NULL; hdata_name = NULL; list_name = NULL; |